mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Make modularized builds work in the unit test.
Former-commit-id: 2d56960e70a2f8c16087cc88c66008e766ea8338
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
// store Lo-Dash to test for bad shim detection
|
// store Lo-Dash to test for bad shim detection
|
||||||
var lodashBadShim = _;
|
var lodashBadShim = window._;
|
||||||
|
|
||||||
// restore nativeKeys
|
// restore nativeKeys
|
||||||
Object.keys = Object._keys;
|
Object.keys = Object._keys;
|
||||||
@@ -54,12 +54,12 @@
|
|||||||
(function() {
|
(function() {
|
||||||
var modulePath = ui.buildPath.replace(/\.js$/, '');
|
var modulePath = ui.buildPath.replace(/\.js$/, '');
|
||||||
return {
|
return {
|
||||||
'baseUrl': './',
|
'baseUrl': '../' + (/modularize/.test(QUnit.urlParams.build) ? 'modularize/' : ''),
|
||||||
'urlArgs': 't=' + (+new Date),
|
'urlArgs': 't=' + (+new Date),
|
||||||
'paths': {
|
'paths': {
|
||||||
'lodash': '../' + modulePath,
|
'lodash': modulePath,
|
||||||
'shimmed': '../abc/../' + modulePath,
|
'shimmed': './abc/../' + modulePath,
|
||||||
'underscore': '../xyz/../' + modulePath
|
'underscore': './xyz/../' + modulePath
|
||||||
},
|
},
|
||||||
'aliases': [
|
'aliases': [
|
||||||
['shimmed', 'lodash'],
|
['shimmed', 'lodash'],
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
case 'lodash-modern': return 'dist/lodash.min.js';
|
case 'lodash-modern': return 'dist/lodash.min.js';
|
||||||
case 'lodash-legacy': return 'dist/lodash.legacy.min.js';
|
case 'lodash-legacy': return 'dist/lodash.legacy.min.js';
|
||||||
case 'lodash-mobile': return 'dist/lodash.mobile.min.js';
|
case 'lodash-mobile': return 'dist/lodash.mobile.min.js';
|
||||||
case 'lodash-modularize': return 'modularize/lodash.js';
|
|
||||||
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
|
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
|
||||||
case 'lodash-custom-dev': return 'lodash.custom.js';
|
case 'lodash-custom-dev': return 'lodash.custom.js';
|
||||||
case 'lodash-custom': return 'lodash.custom.min.js';
|
case 'lodash-custom': return 'lodash.custom.min.js';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
toString = Object.prototype.toString;
|
toString = Object.prototype.toString;
|
||||||
|
|
||||||
/** Use a single "load" function */
|
/** Use a single "load" function */
|
||||||
var load = typeof require == 'function' ? require : window.load;
|
var load = !amd && typeof require == 'function' ? require : window.load;
|
||||||
|
|
||||||
/** The file path of the Lo-Dash file to test */
|
/** The file path of the Lo-Dash file to test */
|
||||||
var filePath = (function() {
|
var filePath = (function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user