relative_dedupe.js 495 B

1234567891011121314151617
  1. var browserify = require('../');
  2. var vm = require('vm');
  3. var test = require('tap').test;
  4. test('relative dedupe', function (t) {
  5. var expected = [ 'a a', 'a b', 'b a', 'b b' ];
  6. t.plan(expected.length + 1);
  7. var b = browserify(__dirname + '/relative_dedupe/main.js');
  8. b.bundle(function (err, src) {
  9. t.ifError(err);
  10. var c = { console: { log: log } };
  11. vm.runInNewContext(src, c);
  12. });
  13. function log (msg) { t.equal(msg, expected.shift()) }
  14. });