Comparing version 5.0.2 to 5.0.3
5.0.3 / 2018-05-02 | ||
================== | ||
* Fix #1775: Default sandbox does not restore stubs, spies, mocks | ||
5.0.2 / 2018-05-01 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -18,6 +18,3 @@ "use strict"; | ||
match: require("./sinon/match"), | ||
spy: require("./sinon/spy"), | ||
spyCall: require("./sinon/call"), | ||
stub: require("./sinon/stub"), | ||
mock: require("./sinon/mock"), | ||
@@ -24,0 +21,0 @@ expectation: require("./sinon/mock-expectation"), |
@@ -5,2 +5,3 @@ "use strict"; | ||
var getPropertyDescriptor = require("./util/core/get-property-descriptor"); | ||
var isEsModule = require("./util/core/is-es-module"); | ||
var isPropertyConfigurable = require("./util/core/is-property-configurable"); | ||
@@ -262,2 +263,6 @@ var isNonExistentOwnProperty = require("./util/core/is-non-existent-own-property"); | ||
sandbox.stub = function stub(object, property) { | ||
if (isEsModule(object)) { | ||
throw new TypeError("ES Modules cannot be stubbed"); | ||
} | ||
if (isNonExistentOwnProperty(object, property)) { | ||
@@ -264,0 +269,0 @@ throw new TypeError("Cannot stub non-existent own property " + valueToString(property)); |
{ | ||
"name": "sinon", | ||
"description": "JavaScript test spies, stubs and mocks.", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"homepage": "http://sinonjs.org/", | ||
@@ -6,0 +6,0 @@ "author": "Christian Johansen", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3555289
38311