aboutsummaryrefslogtreecommitdiff
path: root/test/mocha
diff options
context:
space:
mode:
Diffstat (limited to 'test/mocha')
-rw-r--r--test/mocha/sourcemaps.js12
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() {