subdep.js 388 B

12345678910111213141516
  1. var browserify = require('../');
  2. var vm = require('vm');
  3. var test = require('tap').test;
  4. test('subdep', function (t) {
  5. t.plan(1);
  6. var b = browserify();
  7. b.require(__dirname + '/subdep/index.js', { expose: 'subdep' });
  8. b.bundle(function (err, src) {
  9. var c = {};
  10. vm.runInNewContext(src, c);
  11. t.equal(c.require('subdep'), 'zzz');
  12. });
  13. });