From 9c4c194bb5bf99ddc1457ad84231a7ef248dc2c8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 5 Oct 2016 18:00:00 -0700 Subject: [PATCH] Replace `Object.create` mock with `undefined` to hit more bizarro code paths. --- test/index.html | 12 +----------- test/test.js | 13 +------------ 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/test/index.html b/test/index.html index e536bc2d9..8d3f64f8f 100644 --- a/test/index.html +++ b/test/index.html @@ -83,17 +83,7 @@ // Set bad shims. setProperty(Object, '_create', Object.create); - setProperty(Object, 'create', (function() { - function object() {} - return function(proto) { - if (proto === Object(proto)) { - object.prototype = proto; - var result = new object; - object.prototype = undefined; - } - return result || {}; - }; - }())); + setProperty(Object, 'create', undefined); setProperty(Object, '_getOwnPropertySymbols', Object.getOwnPropertySymbols); setProperty(Object, 'getOwnPropertySymbols', undefined); diff --git a/test/test.js b/test/test.js index aa9894262..c36c73e28 100644 --- a/test/test.js +++ b/test/test.js @@ -518,18 +518,7 @@ funcProto._method = noop; // Set bad shims. - setProperty(Object, 'create', (function() { - function object() {} - return function(proto) { - if (lodashStable.isObject(proto)) { - object.prototype = proto; - var result = new object; - object.prototype = undefined; - } - return result || {}; - }; - }())); - + setProperty(Object, 'create', undefined); setProperty(Object, 'getOwnPropertySymbols', undefined); var _propertyIsEnumerable = objectProto.propertyIsEnumerable;