jest-mock-promise
Advanced tools
Comparing version 1.0.19 to 1.0.20
{ | ||
"name": "jest-mock-promise", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "Synchronous Promise Mock for testing with Jest", | ||
@@ -5,0 +5,0 @@ "main": "dist/jest-mock-promise.js", |
@@ -103,2 +103,4 @@ # What's this? | ||
// providing two numbers which need to be multiplied | ||
// as we know, although we have resolved the promise right away, | ||
// `then` handlers will be called asnyc at later time | ||
resolve(1,2); | ||
@@ -110,5 +112,6 @@ }); | ||
// since the promise will be resolved async, | ||
// we need to test our expectation inside a `then` handler | ||
// and also return a promise to the Jest, so it knows | ||
// Altought promise is already resolved, `then` handlers will | ||
// be called asnyc at later time. That's why we need to put | ||
// our expectation inside a `then` handler | ||
// + we need to return a promise to the Jest, so it knows | ||
// we're doing some async testing | ||
@@ -115,0 +118,0 @@ return(promise.then(() => { |
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
34214
182