Comparing version 6.1.6 to 6.2.0
6.2.0 / 2018-09-04 | ||
================== | ||
* Add mock.usingPromise to set the Promise library for mock expectations | ||
6.1.6 / 2018-09-04 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -10,2 +10,3 @@ "use strict"; | ||
var wrapMethod = require("./util/core/wrap-method"); | ||
var usePromiseLibrary = require("./util/core/use-promise-library"); | ||
@@ -84,2 +85,3 @@ var concat = arrayProto.concat; | ||
push(this.expectations[method], expectation); | ||
usePromiseLibrary(this.promiseLibrary, expectation); | ||
@@ -125,2 +127,8 @@ return expectation; | ||
usingPromise: function usingPromise(promiseLibrary) { | ||
this.promiseLibrary = promiseLibrary; | ||
return this; | ||
}, | ||
invokeMethod: function invokeMethod(method, thisValue, args) { | ||
@@ -127,0 +135,0 @@ /* if we cannot find any matching files we will explicitly call mockExpection#fail with error messages */ |
@@ -92,2 +92,3 @@ "use strict"; | ||
push(collection, m); | ||
usePromiseLibrary(promiseLib, m); | ||
@@ -94,0 +95,0 @@ return m; |
{ | ||
"name": "sinon", | ||
"description": "JavaScript test spies, stubs and mocks.", | ||
"version": "6.1.6", | ||
"version": "6.2.0", | ||
"homepage": "https://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
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
4549250
53138