bundle-stream.js 497 B

123456789101112131415161718
  1. var browserify = require('../');
  2. var test = require('tap').test;
  3. var isReadable = require('isstream').isReadable;
  4. var isWritable = require('isstream').isWritable;
  5. test('bundle is readable stream', function (t) {
  6. t.plan(4);
  7. var b = browserify(__dirname + '/entry/main.js');
  8. b.on('bundle', function(bundle) {
  9. t.ok(isReadable(bundle));
  10. t.notok(isWritable(bundle));
  11. });
  12. var stream = b.bundle();
  13. t.ok(isReadable(stream));
  14. t.notok(isWritable(stream));
  15. });