thunk-test
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "thunk-test", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Modular testing for JavaScript", | ||
@@ -5,0 +5,0 @@ "author": "Richard Tong", |
@@ -32,16 +32,10 @@ # ThunkTest | ||
* not a function - compare the return value directly by [SameValueZero](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) | ||
* an asserter function - pass the return value to theh asserter function and let the asserter handle all the assertions. Note that if this value is a Promise, it is resolved before calling this function | ||
* an asserter function - pass the return value to the asserter function and let the asserter handle all the assertions. Note that if this value is a Promise, it is resolved before calling this function | ||
```coffeescript | ||
Test(string, tester function) | ||
Test(testname string, tester function) | ||
.case(...args, expectedResult any) | ||
Test('my test', myFunc) | ||
.case(...args, asserter (result any)=>Promise|()) | ||
Test(string, tester function) | ||
.case(...args, asserter (result any)=>Promise|(disposer function)|null) | ||
.throws(...args, expectedError Error) | ||
Test('my test', myFunc) | ||
.throws(...args, errorAsserter (error Error, result any)=>Promise|()) | ||
.throws(...args, errorAsserter (error Error, result any)=>Promise|(disposer function)|null) | ||
``` | ||
@@ -48,0 +42,0 @@ |
55364
135