diff --git a/build.js b/build.js index dc2e76415..bf3b48178 100644 --- a/build.js +++ b/build.js @@ -3939,8 +3939,8 @@ '}' ].join('\n')); } - if (isExcluded('mixin')) { - // remove `mixin` call + if (isExcluded('mixin') || isExcluded('value')) { + // remove `_.mixin` call source = source.replace(/(?:\s*\/\/.*)*\n( *)mixin\(.+?\).+/, ''); } if (isExcluded('value')) { diff --git a/test/test-build.js b/test/test-build.js index 2886e431d..e435e8b45 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -1251,26 +1251,6 @@ }); }); - asyncTest('`lodash ' + command + '=mixin`', function() { - var start = _.after(2, _.once(QUnit.start)); - - build(['-s', command + '=mixin'], function(data) { - var basename = path.basename(data.outputPath, '.js'), - context = createContext(); - - vm.runInContext(data.source, context); - var lodash = context._; - - var actual = lodash([1, 2, 3]) - .map(function(num) { return num * num; }) - .value(); - - deepEqual(actual, [1, 4, 9], basename); - equal('mixin' in lodash, false, basename); - start(); - }); - }); - asyncTest('`lodash ' + command + '=value`', function() { var start = _.after(2, _.once(QUnit.start)); @@ -1281,7 +1261,7 @@ vm.runInContext(data.source, context); var lodash = context._; - strictEqual(lodash([1]), undefined, basename); + ok(lodash([1]) instanceof lodash, basename); deepEqual(_.keys(lodash.prototype), [], basename); start(); }); @@ -1418,12 +1398,8 @@ lodash.mixin({ 'x': noop }); equal(lodash.x, noop, basename); + equal(typeof lodash.prototype.x, 'function', basename); - if (index) { - equal(typeof lodash.prototype.x, 'function', basename); - } else { - equal('x' in lodash.prototype, false, basename); - } start(); }); });