You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
343 B

var assert = require( 'assert' );
module.exports = {
description: 'reports which file caused a transform error',
options: {
plugins: [{
transform: function ( code, id ) {
if ( /foo/.test( id ) ) {
throw new Error( 'nope' );
}
}
}]
},
error: function ( err ) {
assert.ok( ~err.message.indexOf( 'foo.js' ) );
}
};