diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mocha/number-literal.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/mocha/number-literal.js b/test/mocha/number-literal.js index a2b16a9e..61c3a6d6 100644 --- a/test/mocha/number-literal.js +++ b/test/mocha/number-literal.js @@ -89,4 +89,13 @@ describe("Number literals", function() { }, code); }); }); + it("Should reject invalid syntax under expression=true", function() { + assert.throws(function() { + UglifyJS.parse("42.g", { + expression: true, + }); + }, function(e) { + return e instanceof UglifyJS.JS_Parse_Error; + }); + }); }); |