Browse Source

fix test output

better-aggressive
Rich-Harris 9 years ago
parent
commit
cf0d3f25e3
  1. 14
      test/test.js

14
test/test.js

@ -151,15 +151,23 @@ describe( 'rollup', function () {
return context[ key ];
});
try {
var fn = new Function( contextKeys, code );
fn.apply( {}, contextValues );
if ( config.error ) {
if ( config.runtimeError ) {
unintendedError = new Error( 'Expected an error while executing output' );
}
} else {
if ( config.exports ) config.exports( module.exports );
if ( config.bundle ) config.bundle( bundle );
}
} catch ( err ) {
if ( config.runtimeError ) {
config.runtimeError( err );
} else {
unintendedError = err;
}
}
if ( config.show || unintendedError ) {
console.log( code + '\n\n\n' );

Loading…
Cancel
Save