1 | const test = require('./config').test
|
2 | const { of } = require('..')
|
3 |
|
4 | test('create CPS functions with single output', t => {
|
5 | of(42)(t.cis(42))
|
6 | })
|
7 |
|
8 | test('create CPS with multi-arg output', t => {
|
9 | // callback to test that x + y = 9
|
10 | const callback = (x, y) => t.cis(9)(x + y)
|
11 | of(2, 7)(callback)
|
12 | })
|
13 |
|
14 | test('no output is passed to the 2nd and following callbacks', t => {
|
15 | t.plan(0) //no test will be run
|
16 | of(55)(x=>x, t.cis(42))
|
17 | of(3,2,1)(x=>x, t.cis(42))
|
18 | }) |
\ | No newline at end of file |