Package Exports
- thunk-test
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (thunk-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ThunkTest
Modular testing for JavaScript. Set up tests as thunks, then execute them with a call.
const add = (a, b) => a + b
ThunkTest('adds two values', add)
.case(5, 5, 10)
.case('abcde', 'fg', result => {
assert.strictEqual(result, 'abcdefg')
})()
// adds two values
// ✓ (5, 5) -> 10
// ✓ ('abcde', 'fg') -> callback(...)
Installation
with npm
npm i thunk-test
browser script, global ThunkTest
<script src="https://unpkg.com/thunk-test"></script>
browser module
import ThunkTest from 'https://unpkg.com/thunk-test/es.js'