diff --git a/test/backbone.html b/test/backbone.html index dd3df9fe0..e338f2799 100644 --- a/test/backbone.html +++ b/test/backbone.html @@ -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); }); }); }()); diff --git a/test/underscore.html b/test/underscore.html index b33ab4728..1c2bf0f15 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -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); }); }());