Add _.isEmpty unit test.

Former-commit-id: 066961a929da280421083d3f9d66b838d3d29dfd
This commit is contained in:
John-David Dalton
2012-05-31 17:40:47 -06:00
parent 7d62bbf74f
commit 7ccb038b6d

View File

@@ -307,6 +307,16 @@
test('fixes the JScript [[DontEnum]] bug (test in IE < 9)', function() {
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);
});
}());
/*--------------------------------------------------------------------------*/