diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-10-11 03:52:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-11 03:52:33 +0800 |
commit | 6d57ca1a59449cd11de296d091a35551ce9cbee7 (patch) | |
tree | 60d947a5031e7b4db89d46f7720a2eab9c75fa0a /test/mocha | |
parent | 3320251b4b5caafb2d28fa22b027c7f0916f6b1a (diff) | |
download | tracifyjs-6d57ca1a59449cd11de296d091a35551ce9cbee7.tar.gz tracifyjs-6d57ca1a59449cd11de296d091a35551ce9cbee7.zip |
improve source map handling (#3464)
fixes #2947
fixes #3277
fixes #3411
Diffstat (limited to 'test/mocha')
-rw-r--r-- | test/mocha/sourcemaps.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/mocha/sourcemaps.js b/test/mocha/sourcemaps.js index 78e100ba..aff2b009 100644 --- a/test/mocha/sourcemaps.js +++ b/test/mocha/sourcemaps.js @@ -181,6 +181,18 @@ describe("sourcemaps", function() { if (result.error) throw result.error; assert.strictEqual(result.code + "\n", readFileSync("test/input/issue-3294/output.js", "utf8")); }); + it("Should work in presence of unrecognised annotations", function() { + var result = UglifyJS.minify(read("./test/input/issue-3441/input.js"), { + compress: false, + mangle: false, + sourceMap: { + content: "inline", + }, + }); + if (result.error) throw result.error; + assert.strictEqual(result.code, '(function(){console.log("hello")}).call(this);'); + assert.strictEqual(result.map, '{"version":3,"sources":["main.coffee"],"names":["console","log"],"mappings":"CAAA,WAAAA,QAAQC,IAAI"}'); + }); }); describe("sourceMapInline", function() { |