Sha256: c975f385a88cccb3683e3aa12dff7f1c3ba9e4eff2e798fea3c2f0dcae6e55ef

Contents?: true

Size: 858 Bytes

Versions: 3

Compression:

Stored size: 858 Bytes

Contents

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

test('bundle in debug mode', function (t) {
    var b = browserify();
    b.require('seq');
    b.bundle({ debug: true }, function (err, src) {
        t.plan(3);
        
        var secondtolastLine = src.split('\n').slice(-2);

        t.ok(typeof src === 'string');
        t.ok(src.length > 0);
        t.ok(/^\/\/@ sourceMappingURL=/.test(secondtolastLine), 'includes sourcemap');
    });
});

test('bundle in non debug mode', function (t) {
    var b = browserify();
    b.require('seq');
    b.bundle(function (err, src) {
        t.plan(3);
        
        var secondtolastLine = src.split('\n').slice(-2);

        t.ok(typeof src === 'string');
        t.ok(src.length > 0);
        t.notOk(/^\/\/@ sourceMappingURL=/.test(secondtolastLine), 'includes no sourcemap');
    });
});

Version data entries

3 entries across 3 versions & 2 rubygems

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