From 6c99816855b650c6804a67f4891c339a3e8970f4 Mon Sep 17 00:00:00 2001 From: Anthony Van de Gejuchte Date: Sat, 18 Jun 2016 17:28:22 +0200 Subject: Normalize error messages --- test/mocha/directives.js | 4 ++-- test/mocha/getter-setter.js | 2 +- test/mocha/with.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/mocha/directives.js b/test/mocha/directives.js index 604b0329..45f454bf 100644 --- a/test/mocha/directives.js +++ b/test/mocha/directives.js @@ -168,7 +168,7 @@ describe("Directives", function() { throw new Error("Expected parser to fail"); } catch (e) { assert.strictEqual(e instanceof uglify.JS_Parse_Error, true); - assert.strictEqual(e.message, "Unexpected token: punc (])"); + assert.strictEqual(e.message, "SyntaxError: Unexpected token: punc (])"); } test_directive(tokenizer, tests[i]); @@ -367,4 +367,4 @@ describe("Directives", function() { ); } }); -}); \ No newline at end of file +}); diff --git a/test/mocha/getter-setter.js b/test/mocha/getter-setter.js index 641a2026..a292fa00 100644 --- a/test/mocha/getter-setter.js +++ b/test/mocha/getter-setter.js @@ -71,7 +71,7 @@ describe("Getters and setters", function() { var fail = function(data) { return function (e) { return e instanceof UglifyJS.JS_Parse_Error && - e.message === "Invalid getter/setter name: " + data.operator; + e.message === "SyntaxError: Invalid getter/setter name: " + data.operator; }; }; diff --git a/test/mocha/with.js b/test/mocha/with.js index d284f1c2..2e758d1e 100644 --- a/test/mocha/with.js +++ b/test/mocha/with.js @@ -9,7 +9,7 @@ describe("With", function() { } var error = function(e) { return e instanceof uglify.JS_Parse_Error && - e.message === "Strict mode may not include a with statement"; + e.message === "SyntaxError: Strict mode may not include a with statement"; } assert.throws(test, error); }); -- cgit v1.2.3