You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
589 B
24 lines
589 B
var test = require('tap').test;
|
|
var browserify = require('../');
|
|
var through = require('through2');
|
|
var vm = require('vm');
|
|
|
|
test('bundle external global', function (t) {
|
|
t.plan(1);
|
|
|
|
var stream = through();
|
|
stream.push('console.log(process)');
|
|
stream.push(null);
|
|
|
|
var b = browserify({ bundleExternal: false });
|
|
b.add(stream);
|
|
b.bundle(function (err, src) {
|
|
vm.runInNewContext(src, {
|
|
console: { log: log },
|
|
process: process
|
|
});
|
|
function log (msg) {
|
|
t.equal(msg, process);
|
|
}
|
|
});
|
|
});
|