Created
September 16, 2009 04:43
-
-
Save lsmith/187868 to your computer and use it in GitHub Desktop.
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
// This assumes the file names are directly mappable to the module names declared | |
// in the YUI.add() calls inside those files. | |
YUI({ | |
modules: { | |
'myapp.tests.core': { fullpath: '/path/to/core.js' } | |
} | |
}).use('myapp.tests.core', function (Y) { | |
var tests = [ '0001','0002', ... ], | |
i, len; | |
for (i = 0, len = tests.length; i < len; ++i) { | |
Y.config.modules[tests[i]] = { fullpath: '/standard/path/'+tests[i]+'.js' }; | |
} | |
tests.push(function (Y) { // this will become the use callback | |
/* all tests are available here */ | |
}); | |
Y.use.apply(Y, tests); // loads all test modules and executes the callback above | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment