simple-mock
Advanced tools
Comparing version
10
index.js
@@ -186,2 +186,12 @@ /* global define */ | ||
} | ||
newFn.withLoop = function () { | ||
newFn.loop = true | ||
return newFn // Chainable | ||
} | ||
newFn.noLoop = function () { | ||
newFn.loop = false | ||
return newFn // Chainable | ||
} | ||
return newFn | ||
@@ -188,0 +198,0 @@ } |
{ | ||
"name": "simple-mock", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Super simple stubs and spies with 1-step sandbox restore", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -159,3 +159,3 @@ # simple-mock | ||
### spy.reset() | ||
### spy.restore() | ||
@@ -211,4 +211,8 @@ Resets all counts and properties to the original state. | ||
### stub.withLoop() & stub.noLoop() | ||
Configures the stub to enable/disable [looping](#stubloop). | ||
## Why | ||
The most complete, framework-agnostic mocking library is [sinon.js](http://sinonjs.org/). It also has pages of documentation and lots of sugar-coating that we generally don't need. Keep it simple! |
14512
2.07%199
4.19%217
1.88%