Files: 4c7ae55ea2df8d52977d122b65825b9350020303 / 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