mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Add another [[DontEnum]] test.
This commit is contained in:
@@ -7081,12 +7081,17 @@
|
||||
delete stringProto.a;
|
||||
});
|
||||
|
||||
test('`_.' + methodName + '` fixes the JScript `[[DontEnum]]` bug (test in IE < 9)', 2, function() {
|
||||
test('`_.' + methodName + '` fixes the JScript `[[DontEnum]]` bug (test in IE < 9)', 3, function() {
|
||||
function Foo() {}
|
||||
Foo.prototype = _.create(shadowedObject);
|
||||
|
||||
deepEqual(func(shadowedObject).sort(), shadowedProps);
|
||||
deepEqual(func(new Foo).sort(), isKeys ? [] : _.without(shadowedProps, 'constructor'));
|
||||
|
||||
var actual = isKeys ? [] : _.without(shadowedProps, 'constructor');
|
||||
deepEqual(func(new Foo).sort(), actual);
|
||||
|
||||
Foo.prototype.constructor = Foo;
|
||||
deepEqual(func(new Foo).sort(), actual);
|
||||
});
|
||||
|
||||
test('`_.' + methodName + '` skips the prototype property of functions (test in Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1)', 2, function() {
|
||||
|
||||
Reference in New Issue
Block a user