Sha256: 1c717366a65f4cbea088e7b21684cf5aed8ce6847cf35e5bc5db1d540c10efd5

Contents?: true

Size: 501 Bytes

Versions: 4

Compression:

Stored size: 501 Bytes

Contents

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

test('dollar', function (t) {
    t.plan(3);
    var b = browserify();
    b.expose('dollar', __dirname + '/dollar/dollar/index.js');
    b.bundle(function (err, src) {
        t.ok(typeof src === 'string');
        t.ok(src.length > 0);
        
        var c = {};
        vm.runInNewContext(src, c);
        var res = vm.runInNewContext('require("dollar")(100)', c);
        t.equal(res, 10000);
    });
});

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
sprockets-browserify-0.3.0 node_modules/browserify/test/dollar.js
sprockets-browserify-0.2.0 node_modules/browserify/test/dollar.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/test/dollar.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/test/dollar.js