synchronous-promise
Advanced tools
+1
-1
| { | ||
| "name": "synchronous-promise", | ||
| "version": "1.0.4", | ||
| "version": "1.0.5", | ||
| "description": "Synchronous Promise-like prototype to use in testing where you would have used an ES6 Promise", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+5
-2
@@ -22,3 +22,3 @@ # synchronous-promise | ||
| const asyncLibraryFake = { | ||
| someMethod: sinon.stub().returns('happy value!') | ||
| someMethod: sinon.stub().returns(Promise.resolve('happy value!')) | ||
| }, | ||
@@ -49,3 +49,3 @@ sut = createSystemUnderTestWith(asyncLibraryFake); | ||
| const asyncLibraryFake = { | ||
| someMethod: sinon.stub().returns('happy value!') | ||
| someMethod: sinon.stub().returns(Promise.resolve('happy value!')) | ||
| }, | ||
@@ -147,2 +147,5 @@ sut = createSystemUnderTestWith(asyncLibraryFake); | ||
| (`race()` isn't because I haven't determined a good strategy for that yet -- but it's | ||
| unlikely you'll need `race()` from a test). | ||
| ### Extras | ||
@@ -149,0 +152,0 @@ `SynchronousPromise` also provides two extra functions to make testing a little |
Sorry, the diff of this file is not supported yet
201
1.52%28093
-2.33%