Sha256: d789a44d20e94e671fac9cbb7cbe37d21440b1a2cf86772d34d34bf9668a90cb

Contents?: true

Size: 826 Bytes

Versions: 7

Compression:

Stored size: 826 Bytes

Contents

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

test('file event', function (t) {
    t.plan(8);
    
    var b = browserify(__dirname + '/entry/main.js');
    var files = {
        'main.js': __dirname + '/entry/main.js',
        'one.js': './one',
        'two.js': './two'
    };
    
    b.on('file', function (file, id) {
        var key = path.basename(file);
        t.equal(file, path.join(__dirname, 'entry', key));
        t.equal(id, files[key]);
        delete files[key];
    });
    
    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/file_event.js
brwy_rails-0.0.6 test/dummy/node_modules/browserify/test/file_event.js
brwy_rails-0.0.5 test/dummy/node_modules/browserify/test/file_event.js
brwy_rails-0.0.4 test/dummy/node_modules/browserify/test/file_event.js
brwy_rails-0.0.3 test/dummy/node_modules/browserify/test/file_event.js
brwy_rails-0.0.2 test/dummy/node_modules/browserify/test/file_event.js
brwy_rails-0.0.1 test/dummy/node_modules/browserify/test/file_event.js