remove support for const (#1910)

As this is not part of ES5.
This commit is contained in:
Alex Lam S.L
2017-05-12 14:57:41 +08:00
committed by GitHub
parent ac73c5d421
commit c391576d52
20 changed files with 36 additions and 591 deletions

View File

@@ -379,21 +379,6 @@ describe("bin/uglifyjs", function () {
done();
});
});
it("Should throw syntax error (const a)", function(done) {
var command = uglifyjscmd + ' test/input/invalid/const.js';
exec(command, function (err, stdout, stderr) {
assert.ok(err);
assert.strictEqual(stdout, "");
assert.strictEqual(stderr.split(/\n/).slice(0, 4).join("\n"), [
"Parse error at test/input/invalid/const.js:7,11",
" const a;",
" ^",
"ERROR: Missing initializer in const declaration"
].join("\n"));
done();
});
});
it("Should throw syntax error (delete x)", function(done) {
var command = uglifyjscmd + ' test/input/invalid/delete.js';