Sha256: d1e2b241c168ddb9513d0ce65031e21c3aa6df864c467739d97f6620bfc0f764

Contents?: true

Size: 693 Bytes

Versions: 3

Compression:

Stored size: 693 Bytes

Contents

var browserify = require('../');
var vm = require('vm');
var test = require('tap').test;

test('bundle', function (t) {
    var b = browserify();
    b.require('seq');
    var src = b.bundle();
    
    t.plan(3);
    
    t.ok(typeof src === 'string');
    t.ok(src.length > 0);
    
    var c = {
        setTimeout : setTimeout,
        console : console
    };
    vm.runInNewContext(src, c);
    
    c.require('seq')([1,2,3])
        .parMap_(function (next, x) {
            setTimeout(function () {
                next.ok(x * 100)
            }, 10)
        })
        .seq(function (x,y,z) {
            t.deepEqual([x,y,z], [100,200,300]);
            t.end();
        })
    ;
});

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
snowball-0.1.22 node_modules/browserify/test/bundle.js
sprockets-browserify-0.1.2 node_modules/browserify/test/bundle.js
sprockets-browserify-0.1.0 node_modules/browserify/test/bundle.js