mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-15 05:07:49 +00:00
Fix fp browser test fails.
This commit is contained in:
@@ -106,6 +106,7 @@
|
||||
QUnit.test('should work when given an object', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
if (!document) {
|
||||
var array = [1, 2, 3, 4],
|
||||
lodash = convert({ 'remove': _.remove });
|
||||
|
||||
@@ -115,11 +116,16 @@
|
||||
|
||||
assert.deepEqual(array, [1, 2, 3, 4]);
|
||||
assert.deepEqual(actual, [1, 3]);
|
||||
}
|
||||
else {
|
||||
skipTest(assert, 2);
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test('should only add a `placeholder` property if needed', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
if (!document) {
|
||||
var methodNames = _.keys(mapping.placeholder),
|
||||
expected = _.map(methodNames, _.constant(true));
|
||||
|
||||
@@ -135,6 +141,10 @@
|
||||
|
||||
var lodash = convert({ 'add': _.add });
|
||||
assert.notOk('placeholder' in lodash);
|
||||
}
|
||||
else {
|
||||
skipTest(assert, 2);
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test('should accept an `options` argument', function(assert) {
|
||||
@@ -241,6 +251,7 @@
|
||||
QUnit.test('should work when given an object and `options`', function(assert) {
|
||||
assert.expect(3);
|
||||
|
||||
if (!document) {
|
||||
var array = [1, 2, 3, 4],
|
||||
lodash = convert({ 'remove': _.remove }, allFalseOptions);
|
||||
|
||||
@@ -251,6 +262,10 @@
|
||||
assert.deepEqual(array, [2, 4]);
|
||||
assert.deepEqual(actual, [1, 3]);
|
||||
assert.deepEqual(lodash.remove(), []);
|
||||
}
|
||||
else {
|
||||
skipTest(assert, 3);
|
||||
}
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user