mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Remove dual environment _.isElement test.
This commit is contained in:
16
test/test.js
16
test/test.js
@@ -7240,7 +7240,7 @@
|
|||||||
this.nodeType = 1;
|
this.nodeType = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
test('should use robust check', 7, function() {
|
test('should return `false` for plain objects', 7, function() {
|
||||||
var element = body || new Element;
|
var element = body || new Element;
|
||||||
|
|
||||||
strictEqual(_.isElement(element), true);
|
strictEqual(_.isElement(element), true);
|
||||||
@@ -7252,20 +7252,6 @@
|
|||||||
strictEqual(_.isElement({ 'nodeType': '001' }), false);
|
strictEqual(_.isElement({ 'nodeType': '001' }), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should use a stronger check in browsers', 2, function() {
|
|
||||||
var expected = !_.support.dom;
|
|
||||||
|
|
||||||
strictEqual(_.isElement(new Element), expected);
|
|
||||||
|
|
||||||
if (lodashBizarro) {
|
|
||||||
expected = !lodashBizarro.support.dom;
|
|
||||||
strictEqual(lodashBizarro.isElement(new Element), expected);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
skipTest();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should return `false` for non DOM elements', 13, function() {
|
test('should return `false` for non DOM elements', 13, function() {
|
||||||
var expected = _.map(falsey, _.constant(false));
|
var expected = _.map(falsey, _.constant(false));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user