Skip to content

Commit 6a86e50

Browse files
authored
Chore: remove loose-parser tests (fixes #14315) (#14569)
1 parent ee3a3ea commit 6a86e50

3 files changed

Lines changed: 0 additions & 139 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"devDependencies": {
8585
"@babel/core": "^7.4.3",
8686
"@babel/preset-env": "^7.4.3",
87-
"acorn": "^7.2.0",
8887
"babel-loader": "^8.0.5",
8988
"chai": "^4.0.1",
9089
"cheerio": "^0.22.0",

tests/lib/rules/no-redeclare.js

Lines changed: 0 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
// Requirements
1010
//------------------------------------------------------------------------------
1111

12-
const path = require("path");
1312
const rule = require("../../../lib/rules/no-redeclare");
1413
const { RuleTester } = require("../../../lib/rule-tester");
1514

1615
//------------------------------------------------------------------------------
1716
// Tests
1817
//------------------------------------------------------------------------------
1918

20-
const looseParserPath = path.resolve(__dirname, "../../tools/loose-parser.js");
2119
const ruleTester = new RuleTester();
2220

2321
ruleTester.run("no-redeclare", rule, {
@@ -205,112 +203,6 @@ ruleTester.run("no-redeclare", rule, {
205203
]
206204
},
207205

208-
// let/const
209-
{
210-
code: "let a; let a;",
211-
parser: looseParserPath,
212-
parserOptions: { ecmaVersion: 2015 },
213-
errors: [
214-
{ message: "'a' is already defined.", type: "Identifier" }
215-
]
216-
},
217-
{
218-
code: "let a; let a;",
219-
parser: looseParserPath,
220-
parserOptions: { ecmaVersion: 2015, sourceType: "module" },
221-
errors: [
222-
{ message: "'a' is already defined.", type: "Identifier" }
223-
]
224-
},
225-
{
226-
code: "let a; let a;",
227-
parser: looseParserPath,
228-
parserOptions: { ecmaVersion: 2015, ecmaFeatures: { globalReturn: true } },
229-
errors: [
230-
{ message: "'a' is already defined.", type: "Identifier" }
231-
]
232-
},
233-
{
234-
code: "let a; const a = 0;",
235-
parser: looseParserPath,
236-
parserOptions: { ecmaVersion: 2015 },
237-
errors: [
238-
{ message: "'a' is already defined.", type: "Identifier" }
239-
]
240-
},
241-
{
242-
code: "const a = 0; const a = 0;",
243-
parser: looseParserPath,
244-
parserOptions: { ecmaVersion: 2015 },
245-
errors: [
246-
{ message: "'a' is already defined.", type: "Identifier" }
247-
]
248-
},
249-
{
250-
code: "if (test) { let a; let a; }",
251-
parser: looseParserPath,
252-
parserOptions: { ecmaVersion: 2015 },
253-
errors: [
254-
{ message: "'a' is already defined.", type: "Identifier" }
255-
]
256-
},
257-
{
258-
code: "switch (test) { case 0: let a; let a; }",
259-
parser: looseParserPath,
260-
parserOptions: { ecmaVersion: 2015 },
261-
errors: [
262-
{ message: "'a' is already defined.", type: "Identifier" }
263-
]
264-
},
265-
{
266-
code: "for (let a, a;;);",
267-
parser: looseParserPath,
268-
parserOptions: { ecmaVersion: 2015 },
269-
errors: [
270-
{ message: "'a' is already defined.", type: "Identifier" }
271-
]
272-
},
273-
{
274-
code: "for (let [a, a] in xs);",
275-
parser: looseParserPath,
276-
parserOptions: { ecmaVersion: 2015 },
277-
errors: [
278-
{ message: "'a' is already defined.", type: "Identifier" }
279-
]
280-
},
281-
{
282-
code: "for (let [a, a] of xs);",
283-
parser: looseParserPath,
284-
parserOptions: { ecmaVersion: 2015 },
285-
errors: [
286-
{ message: "'a' is already defined.", type: "Identifier" }
287-
]
288-
},
289-
{
290-
code: "function f() { let a; let a; }",
291-
parser: looseParserPath,
292-
parserOptions: { ecmaVersion: 2015 },
293-
errors: [
294-
{ message: "'a' is already defined.", type: "Identifier" }
295-
]
296-
},
297-
{
298-
code: "function f(a) { let a; }",
299-
parser: looseParserPath,
300-
parserOptions: { ecmaVersion: 2015 },
301-
errors: [
302-
{ message: "'a' is already defined.", type: "Identifier" }
303-
]
304-
},
305-
{
306-
code: "function f() { if (test) { let a; let a; } }",
307-
parser: looseParserPath,
308-
parserOptions: { ecmaVersion: 2015 },
309-
errors: [
310-
{ message: "'a' is already defined.", type: "Identifier" }
311-
]
312-
},
313-
314206
// Comments and built-ins.
315207
{
316208
code: "/*globals Array */",

tests/tools/loose-parser.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)