From f1b63d41f806ff23adf55e6ce9bc15bbbb03a19a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 2 May 2016 21:34:19 -0700 Subject: [PATCH] Fix test fails for npm package builds. --- test/test.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index 849a369d9..5d9457ee8 100644 --- a/test/test.js +++ b/test/test.js @@ -2711,7 +2711,10 @@ actual = _.last(arguments); }); - assert.ok(actual instanceof mapCaches.Stack); + assert.ok(isNpm + ? actual.constructor.name == 'Stack' + : actual instanceof mapCaches.Stack + ); }); lodashStable.each(['clone', 'cloneDeep'], function(methodName) { @@ -10764,7 +10767,10 @@ actual = _.last(arguments); }); - assert.ok(actual instanceof mapCaches.Stack); + assert.ok(isNpm + ? actual.constructor.name == 'Stack' + : actual instanceof mapCaches.Stack + ); }); QUnit.test('should ensure `customizer` is a function', function(assert) { @@ -15036,7 +15042,10 @@ actual = _.last(arguments); }); - assert.ok(actual instanceof mapCaches.Stack); + assert.ok(isNpm + ? actual.constructor.name == 'Stack' + : actual instanceof mapCaches.Stack + ); }); QUnit.test('should overwrite primitives with source object clones', function(assert) {