diff --git a/test/function/export-default-anonymous-function/_config.js b/test/function/export-default-anonymous-function/_config.js index 3cb321f..245bdaf 100644 --- a/test/function/export-default-anonymous-function/_config.js +++ b/test/function/export-default-anonymous-function/_config.js @@ -9,7 +9,6 @@ module.exports = { return path.basename( importee ).replace( /\..+/, '' ); }, load: function ( id ) { - console.log( 'id', id ) return fs.readFileSync( path.join( __dirname, id + '.js' ), 'utf-8' ); } }] diff --git a/test/function/import-chain-as/main.js b/test/function/import-chain-as/main.js index d1dc2b9..3672452 100644 --- a/test/function/import-chain-as/main.js +++ b/test/function/import-chain-as/main.js @@ -1,5 +1,4 @@ import * as second from './second'; assert.equal( second.first.value, 42 ); -console.log( 'second', second ) assert.deepEqual( second, { first: { value: 42 } }); diff --git a/test/sourcemaps/basic-support/_config.js b/test/sourcemaps/basic-support/_config.js index d2910f7..9c8d790 100644 --- a/test/sourcemaps/basic-support/_config.js +++ b/test/sourcemaps/basic-support/_config.js @@ -7,7 +7,7 @@ module.exports = { description: 'basic sourcemap support', test: function ( code, map ) { assert.equal( map.version, 3 ); - assert.equal( map.file, 'bundle.js' ); + assert.ok( /^bundle\.(\w+)\.js/.test( map.file ) ); var smc = new SourceMapConsumer( map ); var generatedLoc, originalLoc; diff --git a/test/test.js b/test/test.js index 22239fe..e8fc1cd 100644 --- a/test/test.js +++ b/test/test.js @@ -153,7 +153,6 @@ describe( 'rollup', function () { // try to generate output try { - if(config.bundleOptions) { console.log(config.bundleOptions); } var result = bundle.generate( extend( {}, config.bundleOptions, { format: 'cjs' })); @@ -252,7 +251,12 @@ describe( 'rollup', function () { if ( config.skipIfWindows && process.platform === 'win32' ) return; var options = extend( {}, config.options, { - entry: FORM + '/' + dir + '/main.js' + entry: FORM + '/' + dir + '/main.js', + onwarn: msg => { + if ( /No name was provided for/.test( msg ) ) return; + if ( /as external dependency/.test( msg ) ) return; + console.error( msg ); + } }); ( config.skip ? describe.skip : config.solo ? describe.only : describe)( dir, function () { @@ -308,7 +312,7 @@ describe( 'rollup', function () { var config = loadConfig( SOURCEMAPS + '/' + dir + '/_config.js' ); var entry = path.resolve( SOURCEMAPS, dir, 'main.js' ); - var dest = path.resolve( SOURCEMAPS, dir, '_actual/bundle.js' ); + var dest = path.resolve( SOURCEMAPS, dir, '_actual/bundle' ); var options = extend( {}, config.options, { entry: entry @@ -320,7 +324,7 @@ describe( 'rollup', function () { var options = extend( {}, { format: profile.format, sourceMap: true, - dest: dest + dest: `${dest}.${profile.format}.js` }, config.options ); bundle.write( options );