diff --git a/eslint/babel-eslint-parser/test/babel-eslint.js b/eslint/babel-eslint-parser/test/babel-eslint.js index a66f1c40cb..76005da137 100644 --- a/eslint/babel-eslint-parser/test/babel-eslint.js +++ b/eslint/babel-eslint-parser/test/babel-eslint.js @@ -80,7 +80,7 @@ function parseAndAssertSame(code) { // assert.equal(esAST, babylonAST); } -describe("acorn-to-esprima", function () { +describe("babylon-to-esprima", function () { describe("templates", function () { it("empty template string", function () { parseAndAssertSame("``"); diff --git a/eslint/babel-eslint-parser/test/non-regression.js b/eslint/babel-eslint-parser/test/non-regression.js index 9f1e4d9dea..992667a3df 100644 --- a/eslint/babel-eslint-parser/test/non-regression.js +++ b/eslint/babel-eslint-parser/test/non-regression.js @@ -1452,6 +1452,26 @@ describe("verify", function () { ); }); + it("new.target is not reported as undef #235", function () { + verifyAndAssertMessages( + "function foo () { return new.target }", + { "no-undef": 1 }, + [] + ); + }); + + it("decorator does not create TypeError #229", function () { + verifyAndAssertMessages([ + "class A {", + " @test", + " f() {}", + "}" + ].join("\n"), + { "no-undef": 1 }, + [ "2:4 'test' is not defined. no-undef"] + ); + }); + // it("regex with es6 unicodeCodePointEscapes", function () { // verifyAndAssertMessages( // "string.replace(/[\u{0000A0}-\u{10FFFF}<>\&]/gmiu, (char) => `&#x${char.codePointAt(0).toString(16)};`);",