sinon-with-promise
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "sinon-with-promise", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Sugar methods for using sinon.js stubs and spies with promises", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -120,3 +120,3 @@ sinon-with-promise | ||
```js | ||
var spy = sinon.spy().resolves('foo'); | ||
var spy1 = sinon.spy().resolves('foo'); | ||
@@ -131,3 +131,3 @@ function test(spy) { | ||
test(spy) | ||
test(spy1.promised) | ||
.then(function(value) { | ||
@@ -153,3 +153,3 @@ // value === 'foo' | ||
// Example with string | ||
var spy = sinon.spy().rejects('foo'); | ||
var spy1 = sinon.spy().rejects('foo'); | ||
@@ -164,3 +164,3 @@ function test(spy) { | ||
test(spy) | ||
test(spy1.promised) | ||
.then(function(value) { | ||
@@ -182,3 +182,3 @@ // value === 'baz' | ||
test(spy2) | ||
test(spy2.promised) | ||
.then(function(value) { | ||
@@ -185,0 +185,0 @@ // value === 'xab' |
8249