Created
July 16, 2014 20:55
-
-
Save rodneyrehm/760c81da6f0f713444a5 to your computer and use it in GitHub Desktop.
QUnit: why can't setup expose data to tests properly?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Am I missing something here or is this really the way to go for a | |
module's setup function to expose something to the module's tests? | |
*/ | |
(function() { | |
var filled_by_setup; | |
module('dummy module', { | |
setup: function() { | |
// prepare some data | |
filled_by_setup = Math.random(); | |
} | |
}); | |
test('something', function() { | |
equal(typeof filled_by_setup, 'Number', 'is it really?'); | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment