mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Fix amd test fails.
This commit is contained in:
@@ -40,8 +40,9 @@
|
|||||||
var lodash = _.noConflict();
|
var lodash = _.noConflict();
|
||||||
|
|
||||||
return function(_) {
|
return function(_) {
|
||||||
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
|
lodash(_)
|
||||||
lodash.mixin(_, lodash.pick(lodash, lodash.difference([
|
.defaultsDeep({ 'templateSettings': lodash.templateSettings })
|
||||||
|
.mixin(lodash.pick(lodash, lodash.difference([
|
||||||
'countBy',
|
'countBy',
|
||||||
'debounce',
|
'debounce',
|
||||||
'difference',
|
'difference',
|
||||||
@@ -59,17 +60,18 @@
|
|||||||
'reject',
|
'reject',
|
||||||
'sample',
|
'sample',
|
||||||
'without'
|
'without'
|
||||||
], lodash.functions(_))));
|
], lodash.functions(_))))
|
||||||
|
.value();
|
||||||
|
|
||||||
lodash.forOwn(keyMap, function(realName, otherName) {
|
lodash.forOwn(keyMap, function(realName, otherName) {
|
||||||
_[otherName] = lodash[realName];
|
_[otherName] = lodash[realName];
|
||||||
_.prototype[otherName] = lodash.prototype[realName];
|
_.prototype[otherName] = lodash.prototype[realName];
|
||||||
});
|
});
|
||||||
|
|
||||||
lodash.forOwn(aliasToReal, function(realName, alias) {
|
lodash.forOwn(aliasToReal, function(realName, alias) {
|
||||||
_[alias] = _[realName];
|
_[alias] = _[realName];
|
||||||
_.prototype[alias] = _.prototype[realName];
|
_.prototype[alias] = _.prototype[realName];
|
||||||
});
|
});
|
||||||
|
return _;
|
||||||
};
|
};
|
||||||
}());
|
}());
|
||||||
|
|
||||||
@@ -147,7 +149,7 @@
|
|||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
require(getConfig(), ['underscore'], function(lodash) {
|
require(getConfig(), ['underscore'], function(lodash) {
|
||||||
mixinPrereqs(lodash);
|
_ = mixinPrereqs(lodash);
|
||||||
require(getConfig(), ['backbone'], function() {
|
require(getConfig(), ['backbone'], function() {
|
||||||
require(getConfig(), [
|
require(getConfig(), [
|
||||||
'test/setup/dom-setup',
|
'test/setup/dom-setup',
|
||||||
@@ -159,9 +161,7 @@
|
|||||||
'test/router',
|
'test/router',
|
||||||
'test/view',
|
'test/view',
|
||||||
'test/sync'
|
'test/sync'
|
||||||
], function() {
|
], QUnit.start);
|
||||||
QUnit.start();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -352,18 +352,20 @@
|
|||||||
var lodash = _.noConflict();
|
var lodash = _.noConflict();
|
||||||
|
|
||||||
return function(_) {
|
return function(_) {
|
||||||
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
|
lodash(_)
|
||||||
lodash.mixin(_, lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))));
|
.defaultsDeep({ 'templateSettings': lodash.templateSettings })
|
||||||
|
.mixin(lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))))
|
||||||
|
.value();
|
||||||
|
|
||||||
lodash.forOwn(keyMap, function(realName, otherName) {
|
lodash.forOwn(keyMap, function(realName, otherName) {
|
||||||
_[otherName] = lodash[realName];
|
_[otherName] = lodash[realName];
|
||||||
_.prototype[otherName] = lodash.prototype[realName];
|
_.prototype[otherName] = lodash.prototype[realName];
|
||||||
});
|
});
|
||||||
|
|
||||||
lodash.forOwn(aliasToReal, function(realName, alias) {
|
lodash.forOwn(aliasToReal, function(realName, alias) {
|
||||||
_[alias] = _[realName];
|
_[alias] = _[realName];
|
||||||
_.prototype[alias] = _.prototype[realName];
|
_.prototype[alias] = _.prototype[realName];
|
||||||
});
|
});
|
||||||
|
return _;
|
||||||
};
|
};
|
||||||
}());
|
}());
|
||||||
|
|
||||||
@@ -445,9 +447,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
|
QUnit.config.excused.Functions.iteratee = true;
|
||||||
|
QUnit.config.excused.Utility.noConflict = true;
|
||||||
|
QUnit.config.excused.Utility['noConflict (node vm)'] = true;
|
||||||
|
|
||||||
require(getConfig(), [moduleId], function(lodash) {
|
require(getConfig(), [moduleId], function(lodash) {
|
||||||
mixinPrereqs(lodash);
|
_ = mixinPrereqs(lodash);
|
||||||
require(getConfig(), [
|
require(getConfig(), [
|
||||||
'test/collections',
|
'test/collections',
|
||||||
'test/arrays',
|
'test/arrays',
|
||||||
@@ -456,9 +461,7 @@
|
|||||||
'test/cross-document',
|
'test/cross-document',
|
||||||
'test/utility',
|
'test/utility',
|
||||||
'test/chaining'
|
'test/chaining'
|
||||||
], function() {
|
], QUnit.start);
|
||||||
QUnit.start();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user