Fix failing build tests.

Former-commit-id: b3e1f62389f2406b07bb5db5551698ac58e5e8b9
This commit is contained in:
John-David Dalton
2013-07-09 09:10:42 -07:00
parent 2508e71324
commit 8c787fa7f7
2 changed files with 4 additions and 28 deletions

View File

@@ -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')) {

View File

@@ -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();
});
});