mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Fix failing build tests.
Former-commit-id: b3e1f62389f2406b07bb5db5551698ac58e5e8b9
This commit is contained in:
4
build.js
4
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')) {
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user