nyc-bookstores/node_modules/browserify/test/subdep.js

17 lines
375 B
JavaScript
Raw Normal View History

2013-05-27 20:45:59 +00:00
var browserify = require('../');
var vm = require('vm');
var test = require('tap').test;
test('subdep', function (t) {
t.plan(1);
var b = browserify();
b.expose('subdep', __dirname + '/subdep/index.js');
b.bundle(function (err, src) {
var c = {};
vm.runInNewContext(src, c);
t.equal(c.require('subdep'), 'zzz');
});
});