Sha256: 3b159def2f624830ee3e282bccc77b99b4ad171dcfc7499326cfa223eb062b87

Contents?: true

Size: 678 Bytes

Versions: 4

Compression:

Stored size: 678 Bytes

Contents

var test = require('tape');
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

4 entries across 4 versions & 2 rubygems

Version Path
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/browser-pack/test/pack.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/browser-pack/test/pack.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/browser-pack/test/pack.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/browser-pack/test/pack.js