Sha256: 0f176d31ec85466904ab48ac7346a62e16d1e164ed185f2701f8fabcf97b0291

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

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

test('entry', function (t) {
    t.plan(3);
    
    var b = browserify(__dirname + '/entry/main.js');
    b.on('dep', function(row) {
        if (row.entry) t.equal(row.file, __dirname + '/entry/main.js');
    });
    b.bundle(function (err, src) {
        var c = {
            done : function (one, two) {
                t.equal(one, 1);
                t.equal(two, 2);
                t.end();
            }
        };
        vm.runInNewContext(src, c);
    });
});

test('entry via add', function (t) {
    t.plan(3);
    
    var b = browserify();
    b.add(__dirname + '/entry/main.js');
    b.on('dep', function(row) {
        if (row.entry) t.equal(row.file, __dirname + '/entry/main.js');
    });
    b.bundle(function (err, src) {
        var c = {
            done : function (one, two) {
                t.equal(one, 1);
                t.equal(two, 2);
                t.end();
            }
        };
        vm.runInNewContext(src, c);
    });
});

Version data entries

7 entries across 7 versions & 2 rubygems

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