From 1f07f9d1275951b827f097860710781404f8c0c5 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 11 Jun 2014 09:50:19 -0700 Subject: [PATCH] Fix `_.isEqual` test in environment w/o typed arrays. --- test/test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test.js b/test/test.js index 4bf9c6323..e80b28f82 100644 --- a/test/test.js +++ b/test/test.js @@ -4822,11 +4822,11 @@ test('should perform comparisons between typed arrays', 1, function() { var pairs = _.map(typedArrays, function(type, index) { var otherType = typedArrays[++index % typedArrays.length], - CtorA = root[type] || Array, - CtorB = root[otherType] || Array, - bufferA = CtorA == Array ? 8 : new ArrayBuffer(8), - bufferB = CtorB == Array ? 8 : new ArrayBuffer(8), - bufferC = CtorB == Array ? 16 : new ArrayBuffer(16); + CtorA = root[type] || function(n) { this.n = n; }, + CtorB = root[otherType] || function(n) { this.n = n; }, + bufferA = root[type] ? new ArrayBuffer(8) : 8, + bufferB = root[otherType] ? new ArrayBuffer(8) : 8, + bufferC = root[otherType] ? new ArrayBuffer(16) : 16; return [new CtorA(bufferA), new CtorA(bufferA), new CtorB(bufferB), new CtorB(bufferC)]; });