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