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