Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sinon

Package Overview
Dependencies
Maintainers
4
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon - npm Package Compare versions

Comparing version 1.17.5 to 1.17.6

pkg/sinon-1.17.6.js

7

Changelog.txt

@@ -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 @@ ==================

4

lib/sinon/sandbox.js

@@ -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 @@

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc