From d90777b724689af625c36ed6d557b024775ee95a Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 15 Mar 2019 00:20:20 +0800 Subject: parse `mangle.properties.regex` in `--config-file` properly (#3337) fixes #3315 --- test/mocha/minify.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/mocha/minify.js') diff --git a/test/mocha/minify.js b/test/mocha/minify.js index c580e59c..6e6c7a78 100644 --- a/test/mocha/minify.js +++ b/test/mocha/minify.js @@ -119,7 +119,7 @@ describe("minify", function() { it("Should not parse invalid use of reserved words", function() { assert.strictEqual(UglifyJS.minify("function enum(){}").error, undefined); assert.strictEqual(UglifyJS.minify("function static(){}").error, undefined); - assert.strictEqual(UglifyJS.minify("function this(){}").error.message, "Unexpected token: name (this)"); + assert.strictEqual(UglifyJS.minify("function this(){}").error.message, "Unexpected token: name «this»"); }); describe("keep_quoted_props", function() { @@ -214,7 +214,7 @@ describe("minify", function() { var result = UglifyJS.minify("function f(a{}"); var err = result.error; assert.ok(err instanceof Error); - assert.strictEqual(err.stack.split(/\n/)[0], "SyntaxError: Unexpected token punc «{», expected punc «,»"); + assert.strictEqual(err.stack.split(/\n/)[0], "SyntaxError: Unexpected token: punc «{», expected: punc «,»"); assert.strictEqual(err.filename, "0"); assert.strictEqual(err.line, 1); assert.strictEqual(err.col, 12); @@ -241,7 +241,7 @@ describe("minify", function() { }); var err = result.error; assert.ok(err instanceof Error); - assert.strictEqual(err.stack.split(/\n/)[0], "SyntaxError: Unexpected token: keyword (debugger)"); + assert.strictEqual(err.stack.split(/\n/)[0], "SyntaxError: Unexpected token: keyword «debugger»"); }); it("Should skip inherited properties", function() { var foo = Object.create({ skip: this }); -- cgit v1.2.3