Comparing version 4.2.3 to 4.3.0
4.3.0 / 2018-02-10 | ||
================== | ||
* add calledOnceWithExactly assertion (#1247) | ||
4.2.3 / 2018-02-10 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -389,3 +389,3 @@ "use strict"; | ||
function delegateToCalls(method, matchAny, actual, notCalled) { | ||
function delegateToCalls(method, matchAny, actual, notCalled, totalCallCount) { | ||
spyApi[method] = function () { | ||
@@ -399,2 +399,6 @@ if (!this.called) { | ||
if (totalCallCount !== undefined && this.callCount !== totalCallCount) { | ||
return false; | ||
} | ||
var currentCall; | ||
@@ -424,2 +428,3 @@ var matches = 0; | ||
delegateToCalls("calledWith", true); | ||
delegateToCalls("calledOnceWith", true, "calledWith", undefined, 1); | ||
delegateToCalls("calledWithMatch", true); | ||
@@ -429,2 +434,3 @@ delegateToCalls("alwaysCalledWith", false, "calledWith"); | ||
delegateToCalls("calledWithExactly", true); | ||
delegateToCalls("calledOnceWithExactly", true, "calledWithExactly", undefined, 1); | ||
delegateToCalls("alwaysCalledWithExactly", false, "calledWithExactly"); | ||
@@ -431,0 +437,0 @@ delegateToCalls("neverCalledWith", false, "notCalledWith", function () { |
{ | ||
"name": "sinon", | ||
"description": "JavaScript test spies, stubs and mocks.", | ||
"version": "4.2.3", | ||
"version": "4.3.0", | ||
"homepage": "http://sinonjs.org/", | ||
@@ -6,0 +6,0 @@ "author": "Christian Johansen", |
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
3524830
37410