UNPKG

457 BJavaScriptView Raw
1const test = require('./config').test
2const { of } = require('..')
3
4test('create CPS functions with single output', t => {
5 of(42)(t.cis(42))
6})
7
8test('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
14test('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