Comparing version 1.17.5 to 1.17.6
@@ -0,1 +1,8 @@ | ||
v1.17.6 / 2016-09-19 | ||
================== | ||
* Throw when sandbox.restore is given arguments (Fixes #1149) (#1151) | ||
* Fix a regression introduced in #692 (#1098) | ||
v1.17.5 / 2016-07-26 | ||
@@ -2,0 +9,0 @@ ================== |
@@ -96,2 +96,6 @@ /** | ||
restore: function () { | ||
if (arguments.length) { | ||
throw new Error("sandbox.restore() does not take any parameters. Perhaps you meant stub.restore()"); | ||
} | ||
sinon.collection.restore.apply(this, arguments); | ||
@@ -98,0 +102,0 @@ this.restoreContext(); |
@@ -97,2 +97,9 @@ /** | ||
function simplePropertyAssignment() { | ||
wrappedMethod = object[property]; | ||
checkWrappedMethod(wrappedMethod); | ||
object[property] = method; | ||
method.displayName = property; | ||
} | ||
// IE 8 does not support hasOwnProperty on the window object and Firefox has a problem | ||
@@ -130,7 +137,13 @@ // when using hasOwn.call on objects from other frames. | ||
Object.defineProperty(object, property, methodDesc); | ||
// catch failing assignment | ||
// this is the converse of the check in `.restore` below | ||
if ( typeof method === "function" && object[property] !== method ) { | ||
// correct any wrongdoings caused by the defineProperty call above, | ||
// such as adding new items (if object was a Storage object) | ||
delete object[property]; | ||
simplePropertyAssignment(); | ||
} | ||
} else { | ||
wrappedMethod = object[property]; | ||
checkWrappedMethod(wrappedMethod); | ||
object[property] = method; | ||
method.displayName = property; | ||
simplePropertyAssignment(); | ||
} | ||
@@ -137,0 +150,0 @@ |
{ | ||
"name": "sinon", | ||
"description": "JavaScript test spies, stubs and mocks.", | ||
"version": "1.17.5", | ||
"version": "1.17.6", | ||
"homepage": "http://sinonjs.org/", | ||
@@ -6,0 +6,0 @@ "author": "Christian Johansen", |
/** | ||
* Sinon.JS 1.17.5, 2016/07/26 | ||
* Sinon.JS 1.17.6, 2016/09/19 | ||
* | ||
@@ -4,0 +4,0 @@ * @author Christian Johansen (christian@cjohansen.no) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
794919
40
19234
0
47
5