Avoid loading lodash when not needed in unit tests.

This commit is contained in:
John-David Dalton
2013-11-15 22:09:30 -08:00
parent 28e2934a89
commit bca3ff2eac
3 changed files with 11 additions and 6 deletions

View File

@@ -82,9 +82,13 @@
global_test_results = results;
});
// load Lo-Dash again to overwrite the existing `_` value
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
// clear existing `_` value
var _ = undefined;
// load the non-modularized build of Lo-Dash
if (!ui.isModularize) {
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
// load test.js if not using require.js
document.write(ui.urlParams.loader == 'none'
? '<script src="test.js"><\/script>'