thunk-test
Advanced tools
Comparing version 0.7.0 to 0.7.1
{ | ||
"name": "thunk-test", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Modular testing for JavaScript", | ||
@@ -5,0 +5,0 @@ "author": "Richard Tong", |
@@ -63,3 +63,3 @@ # ThunkTest | ||
Note: all callbacks are run with the same context, meaning we can get and set values in the execution context (`this`) of a thunk Test from any provided callback. | ||
Note: since all callbacks are run with the same context, you can get and set values in the execution context (`this`) of a thunk Test from any provided callback. | ||
@@ -80,18 +80,16 @@ ```javascript | ||
Additionally, use a custom object as a starting point for a thunk Test's context with `.call`. | ||
```javascript | ||
Test('hey', function () { | ||
return this.value | ||
}).case(null, 1).call({ value: 'ayo' }) | ||
``` | ||
### Syntax | ||
```coffeescript | ||
Test(story string, func function) -> test ()=>() { | ||
ThunkTest = ()=>() { | ||
before: function=>this, | ||
after: function=>this, | ||
beforeEach: function=>this, | ||
afterEach: function=>this, | ||
case: (...args, expectedResult|function=>())=>this, | ||
throws: (...args, expectedError)=>this, | ||
} | ||
Test(story string, func function) -> ThunkTest | ||
Test(func function) -> ThunkTest | ||
``` | ||
@@ -98,0 +96,0 @@ |
23786
110