Sha256: cbc81739562be19de6fbb9434bdb7ff32b4926b3e6ebe1161bdfd684d78a779a
Contents?: true
Size: 535 Bytes
Versions: 4
Compression:
Stored size: 535 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('tape'); 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
4 entries across 4 versions & 2 rubygems