Sha256: cc06c7822dcf52420e2bf816271ef2de549daf9b68b8cbd44359ecc3fd91599c

Contents?: true

Size: 873 Bytes

Versions: 7

Compression:

Stored size: 873 Bytes

Contents

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

test('transform errors errback', function (t) {
    t.plan(2);
    
    var b = browserify(__dirname + '/tr/main.js');
    b.transform(function (file) {
        return through(function (buf) {
            this.emit('error', new Error('blah'));
        })
    });
    b.bundle(function (err, src) {
        t.ok(/^blah/.test(err.message));
        t.equal(src, undefined);
    });
});

test('transform errors propagate', function (t) {
    t.plan(1);
    
    var b = browserify(__dirname + '/tr/main.js');
    b.transform(function (file) {
        return through(function (buf) {
            this.emit('error', new Error('blah'));
        });
    });
    b.bundle().on('error', function (err) {
        t.ok(/^blah/.test(err.message));
    });
});

Version data entries

7 entries across 7 versions & 2 rubygems

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