mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Add _.isEmpty unit test.
Former-commit-id: 066961a929da280421083d3f9d66b838d3d29dfd
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -307,6 +307,16 @@
|
|||||||
test('fixes the JScript [[DontEnum]] bug (test in IE < 9)', function() {
|
test('fixes the JScript [[DontEnum]] bug (test in IE < 9)', function() {
|
||||||
equal(_.isEmpty(shadowed), false);
|
equal(_.isEmpty(shadowed), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('skips the prototype property of functions (test in Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1)', function() {
|
||||||
|
function Foo() {}
|
||||||
|
Foo.prototype.a = 1;
|
||||||
|
|
||||||
|
equal(_.isEmpty(Foo), true);
|
||||||
|
|
||||||
|
Foo.prototype = { 'a': 1 };
|
||||||
|
equal(_.isEmpty(Foo), true);
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user