Sha256: ac8741ef138662a3c0c8600f1f44b55b2b962b3808a4532212faffcc0f35cb42
Contents?: true
Size: 539 Bytes
Versions: 7
Compression:
Stored size: 539 Bytes
Contents
/** * In node.js `this` on the module root is the same as `exports`. Browser-pack * should act like it too. **/ var test = require('tap').test; var pack = require('../'); test('this', function (t) { t.plan(1); var p = pack(); var src = ''; p.on('data', function (buf) { src += buf; }); p.on('end', function () { var r = Function([], 'return ' + src)(); t.deepEqual(r("abc"), { foo: "bar" }); }); p.end(JSON.stringify([{ id: 'abc', source: 'this.foo = "bar"' }])); });
Version data entries
7 entries across 7 versions & 2 rubygems