From 8290e11c1a7a962b3be47bdafbe3fc138fb00c8b Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Wed, 28 Dec 2016 14:56:27 -0500 Subject: [PATCH] test that file property is being added to sourcemap (#986) --- test/cli/sourcemap-file/_config.js | 6 ++++++ test/cli/sourcemap-file/_expected/bundle.js | 2 ++ test/cli/sourcemap-file/_expected/bundle.js.map | 1 + test/cli/sourcemap-file/main.js | 1 + 4 files changed, 10 insertions(+) create mode 100644 test/cli/sourcemap-file/_config.js create mode 100644 test/cli/sourcemap-file/_expected/bundle.js create mode 100644 test/cli/sourcemap-file/_expected/bundle.js.map create mode 100644 test/cli/sourcemap-file/main.js diff --git a/test/cli/sourcemap-file/_config.js b/test/cli/sourcemap-file/_config.js new file mode 100644 index 0000000..378f192 --- /dev/null +++ b/test/cli/sourcemap-file/_config.js @@ -0,0 +1,6 @@ +const assert = require( 'assert' ); + +module.exports = { + description: 'populates file property of sourcemap (#986)', + command: 'rollup -i main.js -o _actual/bundle.js -m' +}; diff --git a/test/cli/sourcemap-file/_expected/bundle.js b/test/cli/sourcemap-file/_expected/bundle.js new file mode 100644 index 0000000..a1c70d0 --- /dev/null +++ b/test/cli/sourcemap-file/_expected/bundle.js @@ -0,0 +1,2 @@ +console.log( 42 ); +//# sourceMappingURL=bundle.js.map diff --git a/test/cli/sourcemap-file/_expected/bundle.js.map b/test/cli/sourcemap-file/_expected/bundle.js.map new file mode 100644 index 0000000..b36580a --- /dev/null +++ b/test/cli/sourcemap-file/_expected/bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.js","sources":["../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC"} diff --git a/test/cli/sourcemap-file/main.js b/test/cli/sourcemap-file/main.js new file mode 100644 index 0000000..5c72ff3 --- /dev/null +++ b/test/cli/sourcemap-file/main.js @@ -0,0 +1 @@ +console.log( 42 );