Fix amd test fails.

This commit is contained in:
John-David Dalton
2016-10-15 12:14:57 -07:00
parent 4af0c066ec
commit c82322c490
2 changed files with 35 additions and 32 deletions

View File

@@ -40,36 +40,38 @@
var lodash = _.noConflict();
return function(_) {
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
lodash.mixin(_, lodash.pick(lodash, lodash.difference([
'countBy',
'debounce',
'difference',
'find',
'findIndex',
'findLastIndex',
'groupBy',
'includes',
'invert',
'invokeMap',
'keyBy',
'omit',
'partition',
'reduceRight',
'reject',
'sample',
'without'
], lodash.functions(_))));
lodash(_)
.defaultsDeep({ 'templateSettings': lodash.templateSettings })
.mixin(lodash.pick(lodash, lodash.difference([
'countBy',
'debounce',
'difference',
'find',
'findIndex',
'findLastIndex',
'groupBy',
'includes',
'invert',
'invokeMap',
'keyBy',
'omit',
'partition',
'reduceRight',
'reject',
'sample',
'without'
], lodash.functions(_))))
.value();
lodash.forOwn(keyMap, function(realName, otherName) {
_[otherName] = lodash[realName];
_.prototype[otherName] = lodash.prototype[realName];
});
lodash.forOwn(aliasToReal, function(realName, alias) {
_[alias] = _[realName];
_.prototype[alias] = _.prototype[realName];
});
return _;
};
}());
@@ -147,7 +149,7 @@
QUnit.config.autostart = false;
require(getConfig(), ['underscore'], function(lodash) {
mixinPrereqs(lodash);
_ = mixinPrereqs(lodash);
require(getConfig(), ['backbone'], function() {
require(getConfig(), [
'test/setup/dom-setup',
@@ -159,9 +161,7 @@
'test/router',
'test/view',
'test/sync'
], function() {
QUnit.start();
});
], QUnit.start);
});
});
}());

View File

@@ -352,18 +352,20 @@
var lodash = _.noConflict();
return function(_) {
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
lodash.mixin(_, lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))));
lodash(_)
.defaultsDeep({ 'templateSettings': lodash.templateSettings })
.mixin(lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))))
.value();
lodash.forOwn(keyMap, function(realName, otherName) {
_[otherName] = lodash[realName];
_.prototype[otherName] = lodash.prototype[realName];
});
lodash.forOwn(aliasToReal, function(realName, alias) {
_[alias] = _[realName];
_.prototype[alias] = _.prototype[realName];
});
return _;
};
}());
@@ -445,9 +447,12 @@
}
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) {
mixinPrereqs(lodash);
_ = mixinPrereqs(lodash);
require(getConfig(), [
'test/collections',
'test/arrays',
@@ -456,9 +461,7 @@
'test/cross-document',
'test/utility',
'test/chaining'
], function() {
QUnit.start();
});
], QUnit.start);
});
}());
</script>