entry_exec.js 389 B

123456789101112131415
  1. var browserify = require('../');
  2. var vm = require('vm');
  3. var test = require('tap').test;
  4. test('only execute entry files', function (t) {
  5. t.plan(1);
  6. var b = browserify();
  7. b.add(__dirname + '/entry_exec/main.js');
  8. b.require(__dirname + '/entry_exec/fail.js');
  9. b.bundle(function (err, src) {
  10. var c = { t: t };
  11. vm.runInNewContext(src, c);
  12. });
  13. });