git ssb

3+

cel / ssb-npm-registry



Tree: d2f2697f296dd39aed6a8b63c6d04a736a7db5b3

Files: d2f2697f296dd39aed6a8b63c6d04a736a7db5b3 / node_modules / multicb / test / errors.js

443 bytesRaw
1'use strict'
2var multicb = require('../')
3var t = require('assert')
4
5require('interleavings').test(function (isAsync) {
6
7 function async(cb, delay, args) {
8 isAsync(function() { cb.apply(null, args) })()
9 }
10
11 var done = multicb()
12 async(done(), 5, [null, 1])
13 async(done(), 15, [null, 2])
14 async(done(), 10, ['fail'])
15 done(function(err, results) {
16 t.equal(err, 'fail')
17 t.equal(results, void 0)
18 isAsync.done()
19 })
20
21})
22

Built with git-ssb-web