mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Avoid loading lodash when not needed in unit tests.
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
global_test_results = results;
|
||||
});
|
||||
|
||||
// load Lo-Dash again to overwrite the existing `_` value
|
||||
// load the build of Lo-Dash
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
</script>
|
||||
<script>
|
||||
|
||||
@@ -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>'
|
||||
|
||||
@@ -110,9 +110,10 @@
|
||||
global_test_results = results;
|
||||
});
|
||||
|
||||
// load Lo-Dash again to overwrite the existing `_` value
|
||||
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
|
||||
|
||||
// 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 data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
|
||||
Reference in New Issue
Block a user