Sha256: e6004e00094438246e04871cdbba5ea079b93d29b7d7bf4bf87a5223c746107c

Contents?: true

Size: 682 Bytes

Versions: 7

Compression:

Stored size: 682 Bytes

Contents

var test = require('tap').test;
var pack = require('../');

test('pack', function (t) {
    t.plan(4);
    
    var p = pack();
    var src = '';
    p.on('data', function (buf) { src += buf });
    p.on('end', function () {
        var r = Function(['T'], 'return ' + src)(t);
        t.equal(r('xyz')(5), 555);
        t.equal(r('xyz')(5), 555);
    });
    
    p.end(JSON.stringify([
        {
            id: 'abc',
            source: 'T.equal(require("./xyz")(3), 333)',
            entry: true,
            deps: { './xyz': 'xyz' }
        },
        {
            id: 'xyz',
            source: 'T.ok(true); module.exports=function(n){return n*111}'
        }
    ]));
});

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
minimum_viable_product-0.0.11 test/dummy/node_modules/browser-pack/test/pack.js
brwy_rails-0.0.6 test/dummy/node_modules/browser-pack/test/pack.js
brwy_rails-0.0.5 test/dummy/node_modules/browser-pack/test/pack.js
brwy_rails-0.0.4 test/dummy/node_modules/browser-pack/test/pack.js
brwy_rails-0.0.3 test/dummy/node_modules/browser-pack/test/pack.js
brwy_rails-0.0.2 test/dummy/node_modules/browser-pack/test/pack.js
brwy_rails-0.0.1 test/dummy/node_modules/browser-pack/test/pack.js