unexpected-sinon
Advanced tools
Comparing version
@@ -33,2 +33,13 @@ // Copyright (c) 2013 Sune Simonsen <sune@we-knowhow.dk> | ||
}(this, function (sinon) { | ||
var objectIs = Object.is || function (a, b) { | ||
// Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | ||
if (a === 0 && b === 0) { | ||
return 1 / a === 1 / b; | ||
} | ||
if (a !== a) { | ||
return b !== b; | ||
} | ||
return a === b; | ||
}; | ||
function isSpy(value) { | ||
@@ -166,3 +177,3 @@ return value && typeof value.id === 'string' && | ||
function convertArgumentWithKey(key) { | ||
return Object.is(subject[key], value[key]) ? | ||
return objectIs(subject[key], value[key]) ? | ||
expect.it('to be', value[key]) : | ||
@@ -169,0 +180,0 @@ convertSinonMatchers(expect, value[key]); |
{ | ||
"name": "unexpected-sinon", | ||
"version": "6.1.1", | ||
"version": "6.1.2", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
180587
0.19%5696
0.18%