substantial / sinon-stub-promise

Synchronous Promise stubbing for Sinon.JS
MIT License
85 stars 11 forks source link

A stub can only resolve a value once. #4

Closed a-b-r-o-w-n closed 8 years ago

a-b-r-o-w-n commented 9 years ago
stub = sinon.stub.returnsPromise().resolves('some thing');

someFunction(); // stub will resolve with 'some thing'
someFunction(); // stub will resolve with undefined
amay commented 9 years ago

What is someFunction in this example?

a-b-r-o-w-n commented 9 years ago

someFunction is a promise under test that uses the stub.

rhagigi commented 8 years ago

Is this completed fixed by #12? If it is, it should be closed.