Files: d2f2697f296dd39aed6a8b63c6d04a736a7db5b3 / node_modules / pull-stream / test / map.js
355 bytesRaw
1 | |
2 | var tape = require('tape') |
3 | |
4 | var pull = require('../') |
5 | |
6 | |
7 | tape('map throughs ends stream', function (t) { |
8 | var err = new Error('unwholesome number') |
9 | pull( |
10 | pull.values([1,2,3,3.4,4]), |
11 | pull.map(function (e) { |
12 | if(e !== ~~e) |
13 | throw err |
14 | }), |
15 | pull.drain(null, function (_err) { |
16 | t.equal(_err, err) |
17 | t.end() |
18 | }) |
19 | ) |
20 | }) |
21 |
Built with git-ssb-web