Sha256: 310309bfed0b773a2f6d4e5ec2e3c3ebed85418689895854249b835d50fcb952

Contents?: true

Size: 595 Bytes

Versions: 7

Compression:

Stored size: 595 Bytes

Contents

var test = require('tap').test;
var browserify = require('../');
var path = require('path');
var mainfile = path.join(__dirname, 'ignore_browser_field/main.js');
var vm = require('vm');

test('ignore browser field', function (t) {
    t.plan(3);
    var b = browserify(mainfile, { browserField: false });
    var expected = [ 'A:NODE', 'B:X.JS' ];
    
    b.bundle(function (err, src) {
        t.ifError(err);
        var c = { console: { log: log } };
        vm.runInNewContext(src, c);
        
        function log (msg) {
            t.equal(msg, expected.shift());
        }
    });
});

Version data entries

7 entries across 7 versions & 2 rubygems

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