Skip to content

Commit

Permalink
added deleted test
Browse files Browse the repository at this point in the history
  • Loading branch information
imjordanxd committed Sep 7, 2024
1 parent 0278708 commit 4de52d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/lib/rules/no-useless-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ ruleTester.run("no-useless-constructor", rule, {
}]
}]
},
{
code: "class A extends B { constructor(a, b, ...c) { super(a, b, ...c); } }",
errors: [{
...error,
suggestions: [{
messageId: "removeConstructor",
output: "class A extends B { }"
}]
}]
},
{
code: "class A {\nfoo = 5\nconstructor() {}\nbar() {}\n}",
languageOptions: { ecmaVersion: 2022 },
Expand Down

0 comments on commit 4de52d8

Please sign in to comment.