Skip to content

Commit

Permalink
test to make sure console statement with semicolon is removed via sug…
Browse files Browse the repository at this point in the history
…gestion
  • Loading branch information
Rec0iL99 committed Nov 7, 2023
1 parent c79833d commit a74dc87
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/lib/rules/no-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ ruleTester.run("no-console", rule, {
}]
}]
},
{
code: "a();\nconsole.log(foo);\nb();",
errors: [{
messageId: "unexpected",
type: "MemberExpression",
suggestions: [{
messageId: "removeConsole",
data: { propertyName: "log" },
output: "a();\n\nb();"
}]
}]
},
{
code: "class A { static { console.info(foo) } }",
parserOptions: { ecmaVersion: "latest" },
Expand Down

0 comments on commit a74dc87

Please sign in to comment.