From 4a1a435dc3162a68f48bc4c59570be05252b5c37 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Tue, 22 Sep 2015 10:25:12 -0400 Subject: [PATCH] use absolute sourceMapFile to verify relative sources (#125) --- test/sourcemaps/basic-support/_config.js | 6 +++--- test/test.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/sourcemaps/basic-support/_config.js b/test/sourcemaps/basic-support/_config.js index b83cd6b..c547c32 100644 --- a/test/sourcemaps/basic-support/_config.js +++ b/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' ); } }; diff --git a/test/test.js b/test/test.js index 4e2bd25..00a6f45 100644 --- a/test/test.js +++ b/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 );