Sha256: 30bd1047be75af3256ee8ccc0a26a67a3389e815423730c542f89308b0d95ffd
Contents?: true
Size: 554 Bytes
Versions: 7
Compression:
Stored size: 554 Bytes
Contents
var test = require('tap').test; var browserify = require('../'); var path = require('path'); var vm = require('vm'); test('entry expose', function (t) { t.plan(3) var b = browserify(); b.add(__dirname + '/entry_expose/main.js'); b.require(__dirname + '/entry_expose/main.js', { expose: 'x' }); b.bundle(function (err, src) { t.ifError(err); var c = { console: { log: log } }; function log (msg) { t.equal(msg, 'wow') } vm.runInNewContext(src, c); t.equal(c.require('x'), 555); }) });
Version data entries
7 entries across 7 versions & 2 rubygems