stream.js 396 B

123456789101112131415
  1. var browserify = require('../');
  2. var vm = require('vm');
  3. var test = require('tap').test;
  4. var fs = require('fs');
  5. test('stream', function (t) {
  6. t.plan(2);
  7. var stream = fs.createReadStream(__dirname + '/stream/main.js');
  8. var b = browserify(stream, { basedir: __dirname + '/stream' });
  9. b.bundle(function (err, src) {
  10. vm.runInNewContext(src, { t: t });
  11. });
  12. });