unexpected-sinon
Advanced tools
Comparing version
@@ -175,3 +175,7 @@ /*global location*/ | ||
if (isSandbox(obj)) { | ||
spies = obj.fakes || []; | ||
if (obj.getFakes) { | ||
spies = obj.getFakes(); | ||
} else { | ||
spies = obj.fakes || []; | ||
} | ||
} else if (Array.isArray(obj)) { | ||
@@ -884,3 +888,2 @@ spies = []; | ||
} | ||
var args = [calls, 'to have items satisfying', 'threw']; | ||
@@ -887,0 +890,0 @@ if (value) { |
{ | ||
"name": "unexpected-sinon", | ||
"version": "10.9.0", | ||
"version": "10.10.0", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -39,9 +39,9 @@ "keywords": [ | ||
"eslint-config-onelint": "^3.0.0", | ||
"istanbul": "^0.3.17", | ||
"mocha": "^2.4.5", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^5.1.0", | ||
"mocha-phantomjs-core": "^2.0.1", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"rsvp": "^3.0.18", | ||
"rsvp": "^4.8.2", | ||
"serve": "*", | ||
"sinon": "^2.3.7", | ||
"sinon": "^5.0.2", | ||
"unexpected": "^10.23.0", | ||
@@ -48,0 +48,0 @@ "unexpected-documentation-site-generator": "^4.5.0", |
@@ -61,8 +61,26 @@ // Monkey-patch sinon.create to patch all created spyCall instances | ||
} | ||
['spy', 'stub'].forEach(function (name) { | ||
replace(name, sinon); | ||
replace(name, sinon.sandbox); | ||
}); | ||
if (sinon.sandbox.create) { | ||
var originalSandboxCreate = sinon.sandbox.create; | ||
sinon.sandbox.create = function () { | ||
var sandbox = originalSandboxCreate.apply(this, arguments); | ||
replace('spy', sandbox); | ||
replace('stub', sandbox); | ||
return sandbox; | ||
}; | ||
} | ||
if (sinon.createSandbox) { | ||
var originalCreateSandbox = sinon.createSandbox; | ||
sinon.createSandbox = function () { | ||
var sandbox = originalCreateSandbox.apply(this, arguments); | ||
replace('spy', sandbox); | ||
replace('stub', sandbox); | ||
return sandbox; | ||
}; | ||
} | ||
var origCreateStubInstance = sinon.createStubInstance; | ||
@@ -69,0 +87,0 @@ sinon.createStubInstance = function () { // ... |
Sorry, the diff of this file is too big to display
423664
0.23%7578
0.37%