Comparing version 1.9.0 to 1.9.1
@@ -44,2 +44,6 @@ /*jslint eqeqeq: false, onevar: false, forin: true, nomen: false, regexp: false, plusplus: false*/ | ||
function isReallyNaN(val) { | ||
return typeof val === 'number' && isNaN(val); | ||
} | ||
function mirrorProperties(target, source) { | ||
@@ -146,4 +150,9 @@ for (var prop in source) { | ||
} | ||
if (typeof a != "object" || typeof b != "object") { | ||
return a === b; | ||
if (typeof a != 'object' || typeof b != 'object') { | ||
if (isReallyNaN(a) && isReallyNaN(b)) { | ||
return true; | ||
} else { | ||
return a === b; | ||
} | ||
} | ||
@@ -164,3 +173,3 @@ | ||
if (a instanceof RegExp && b instanceof RegExp) { | ||
return (a.source === b.source) && (a.global === b.global) && | ||
return (a.source === b.source) && (a.global === b.global) && | ||
(a.ignoreCase === b.ignoreCase) && (a.multiline === b.multiline); | ||
@@ -167,0 +176,0 @@ } |
@@ -27,2 +27,9 @@ /*jslint eqeqeq: false, plusplus: false, evil: true, onevar: false, browser: true, forin: false*/ | ||
(function (global) { | ||
// node expects setTimeout/setInterval to return a fn object w/ .ref()/.unref() | ||
// browsers, a number. | ||
// see https://github.com/cjohansen/Sinon.JS/pull/436 | ||
var timeoutResult = setTimeout(function() {}, 0); | ||
var addTimerReturnsObject = typeof timeoutResult === 'object'; | ||
clearTimeout(timeoutResult); | ||
var id = 1; | ||
@@ -57,3 +64,12 @@ | ||
return toId; | ||
if (addTimerReturnsObject) { | ||
return { | ||
id: toId, | ||
ref: function() {}, | ||
unref: function() {} | ||
}; | ||
} | ||
else { | ||
return toId; | ||
} | ||
} | ||
@@ -60,0 +76,0 @@ |
{ | ||
"name": "sinon", | ||
"description": "JavaScript test spies, stubs and mocks.", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"homepage": "http://cjohansen.no/sinon/", | ||
@@ -25,3 +25,4 @@ "author": "Christian Johansen", | ||
"dependencies": { | ||
"formatio": "~1.0" | ||
"formatio": "~1.0", | ||
"util": ">=0.10.3 <1" | ||
}, | ||
@@ -28,0 +29,0 @@ "devDependencies": { |
/** | ||
* Sinon.JS 1.9.0, 2014/03/05 | ||
* Sinon.JS 1.9.1, 2014/04/03 | ||
* | ||
@@ -4,0 +4,0 @@ * @author Christian Johansen (christian@cjohansen.no) |
@@ -366,2 +366,6 @@ /*jslint onevar: false, eqeqeq: false*/ | ||
"passes NaN and NaN": function () { | ||
assert(sinon.deepEqual(NaN, NaN)); | ||
}, | ||
"passes equal objects": function () { | ||
@@ -368,0 +372,0 @@ var obj1 = { a: 1, b: 2, c: 3, d: "hey", e: "there" }; |
@@ -858,5 +858,12 @@ /*jslint onevar: false, eqeqeq: false, plusplus: false*/ | ||
var id = setTimeout(stub, 1000); | ||
var to = setTimeout(stub, 1000); | ||
assert.isNumber(id); | ||
if (typeof (setTimeout(function() {}, 0)) === 'object') { | ||
assert.isNumber(to.id); | ||
assert.isFunction(to.ref); | ||
assert.isFunction(to.unref); | ||
} | ||
else { | ||
assert.isNumber(to); | ||
} | ||
}, | ||
@@ -863,0 +870,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
1773556
2
58
37926
+ Addedutil@>=0.10.3 <1
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arguments@1.1.1(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedutil@0.12.5(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)