hash.js 411 B

123456789101112131415
  1. var browserify = require('../');
  2. var vm = require('vm');
  3. var test = require('tap').test;
  4. test('hash', function (t) {
  5. t.plan(3);
  6. var b = browserify(__dirname + '/hash/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 CONTENTS', 'g')).length, 1);
  11. vm.runInNewContext(src, c);
  12. });
  13. });