standalone_events.js 419 B

12345678910111213141516171819
  1. var browserify = require('../');
  2. var test = require('tap').test;
  3. test('standalone bundle close event', {timeout: 1000}, function (t) {
  4. t.plan(1);
  5. var ended = false;
  6. var b = browserify(__dirname + '/standalone/main.js', {
  7. standalone: 'stand-test'
  8. });
  9. var r = b.bundle();
  10. r.resume();
  11. r.on('end', function() {
  12. t.ok(!ended);
  13. ended = true;
  14. t.end();
  15. });
  16. });