Sha256: 378367e3815c4976ab30134a329632231dc6f63d1fae9973693a72a73c9c799a

Contents?: true

Size: 601 Bytes

Versions: 3

Compression:

Stored size: 601 Bytes

Contents

var test = require('tap').test;
var mdeps = require('module-deps');
var bpack = require('browser-pack');
var insert = require('../');
var vm = require('vm');

test('always insert', function (t) {
    t.plan(6);
    var files = [ __dirname + '/always/main.js' ];
    var s = mdeps(files)
        .pipe(insert(files, { always: true }))
        .pipe(bpack({ raw: true }))
    ;
    var src = '';
    s.on('data', function (buf) { src += buf });
    s.on('end', function () {
        var c = {
            t: t,
            window: { xyz: 555 }
        };
        vm.runInNewContext(src, c);
    });
});

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/insert-module-globals/test/always.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/insert-module-globals/test/always.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/insert-module-globals/test/always.js