Browse Source

use absolute sourceMapFile to verify relative sources (#125)

module-order
Rich-Harris 9 years ago
parent
commit
4a1a435dc3
  1. 6
      test/sourcemaps/basic-support/_config.js
  2. 2
      test/test.js

6
test/sourcemaps/basic-support/_config.js

@ -18,7 +18,7 @@ module.exports = {
assert.equal( originalLoc.line, 4 );
assert.equal( originalLoc.column, 0 );
assert.equal( path.resolve( originalLoc.source ), path.resolve( __dirname, 'main.js' ) );
assert.equal( originalLoc.source, 'sourcemaps/basic-support/main.js' );
// foo.js
generatedLoc = getLocation( code, code.indexOf( "console.log( 'hello from foo.js' )" ) );
@ -26,7 +26,7 @@ module.exports = {
assert.equal( originalLoc.line, 2 );
assert.equal( originalLoc.column, 1 );
assert.equal( path.resolve( originalLoc.source ), path.resolve( __dirname, 'foo.js' ) );
assert.equal( originalLoc.source, 'sourcemaps/basic-support/foo.js' );
// bar.js
generatedLoc = getLocation( code, code.indexOf( "console.log( 'hello from bar.js' )" ) );
@ -34,6 +34,6 @@ module.exports = {
assert.equal( originalLoc.line, 2 );
assert.equal( originalLoc.column, 1 );
assert.equal( path.resolve( originalLoc.source ), path.resolve( __dirname, 'bar.js' ) );
assert.equal( originalLoc.source, 'sourcemaps/basic-support/bar.js' );
}
};

2
test/test.js

@ -225,7 +225,7 @@ describe( 'rollup', function () {
var options = extend( {}, config.options, {
format: profile.format,
sourceMap: true,
sourceMapFile: 'bundle.js'
sourceMapFile: path.resolve( __dirname, 'bundle.js' )
});
var result = bundle.generate( options );

Loading…
Cancel
Save