From b768ce4ca42ed999dc35da7c1551f2b17ad542d2 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 28 Oct 2014 23:44:27 -0700 Subject: [PATCH] Add test for inherited shadowed props. --- test/test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index ed6f2555a..db6a6b7d9 100644 --- a/test/test.js +++ b/test/test.js @@ -7081,8 +7081,12 @@ delete stringProto.a; }); - test('`_.' + methodName + '` fixes the JScript `[[DontEnum]]` bug (test in IE < 9)', 1, function() { + test('`_.' + methodName + '` fixes the JScript `[[DontEnum]]` bug (test in IE < 9)', 2, function() { + function Foo() {} + Foo.prototype = _.create(shadowedObject); + deepEqual(func(shadowedObject).sort(), shadowedProps); + deepEqual(func(new Foo).sort(), isKeys ? [] : _.without(shadowedProps, 'constructor')); }); 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() {