symlink_dedupe.js 553 B

12345678910111213141516
  1. var browserify = require('../');
  2. var vm = require('vm');
  3. var test = require('tap').test;
  4. test('hash instances with hashed contexts', { skip: process.platform === 'win32' }, function (t) {
  5. t.plan(5);
  6. var b = browserify(__dirname + '/symlink_dedupe/main.js');
  7. b.bundle(function (err, buf) {
  8. var c = { t: t };
  9. var src = buf.toString('utf8');
  10. t.equal(src.match(RegExp('// FILE F ONE', 'g')).length, 1);
  11. t.equal(src.match(RegExp('// FILE G ONE', 'g')).length, 1);
  12. vm.runInNewContext(src, c);
  13. });
  14. });