mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Make modularized builds tested and avoid errors when running modularized tests.
Former-commit-id: 38aa57ec3d401cb3892093008d75d03545d63c6b
This commit is contained in:
@@ -55,10 +55,11 @@
|
||||
}
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = (location.origin + location.pathname).split(/\btest\b/).slice(0, -1).join('test'),
|
||||
isModularize = /modularize/.test(ui.urlParams.build),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
moduleMain = modulePath.match(reBasename)[0];
|
||||
|
||||
var locationPath = /modularize/.test(ui.urlParams.build)
|
||||
var locationPath = isModularize
|
||||
? '../modularize'
|
||||
: modulePath.replace(reBasename, '');
|
||||
|
||||
@@ -108,6 +109,9 @@
|
||||
lodashModule = lodash.noConflict();
|
||||
lodashModule.moduleName = 'lodash';
|
||||
}
|
||||
if (isModularize) {
|
||||
window._ = lodash;
|
||||
}
|
||||
require([testPath], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user