Sha256: 406c67ee8558c456c7a8f0c0d0ccd2c292cabf0cc52c777576665a2c99392b05

Contents?: true

Size: 695 Bytes

Versions: 7

Compression:

Stored size: 695 Bytes

Contents

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

test('early return', function (t) {
    t.plan(4);
    var s = mdeps()
    s.pipe(bpack({ raw: true })).pipe(concat(function (src) {
        var c = {
            t: t,
            setTimeout: setTimeout,
            clearTimeout: clearTimeout
        };
        vm.runInNewContext(src, c);
    }));
    s.write({ transform: inserter, global: true });
    s.end(__dirname + '/return/main.js');
});

function inserter (file) {
    return insert(file, {
        basedir: __dirname + '/return'
    });
}

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
minimum_viable_product-0.0.11 test/dummy/node_modules/insert-module-globals/test/return.js
brwy_rails-0.0.6 test/dummy/node_modules/insert-module-globals/test/return.js
brwy_rails-0.0.5 test/dummy/node_modules/insert-module-globals/test/return.js
brwy_rails-0.0.4 test/dummy/node_modules/insert-module-globals/test/return.js
brwy_rails-0.0.3 test/dummy/node_modules/insert-module-globals/test/return.js
brwy_rails-0.0.2 test/dummy/node_modules/insert-module-globals/test/return.js
brwy_rails-0.0.1 test/dummy/node_modules/insert-module-globals/test/return.js