fake.js 378 B

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