empty.js 389 B

1234567891011121314151617
  1. var pipeline = require('../');
  2. var concat = require('concat-stream');
  3. var test = require('tape');
  4. test('empty passthrough stream', function (t) {
  5. t.plan(1);
  6. var stream = pipeline([]);
  7. stream.pipe(concat(function (body) {
  8. t.deepEqual(body.toString(), 'abc');
  9. }));
  10. stream.write('a');
  11. stream.write('b');
  12. stream.write('c');
  13. stream.end();
  14. });