Skip to content

Commit

Permalink
Test: add no-magic-numbers test
Browse files Browse the repository at this point in the history
  • Loading branch information
moeriki committed Jun 30, 2020
1 parent c22b43e commit 4cda76d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/lib/rules/no-magic-numbers.js
Expand Up @@ -748,6 +748,13 @@ ruleTester.run("no-magic-numbers", rule, {
{ messageId: "noMagic", data: { raw: "123" }, line: 1 }
]
},
{
code: "const { param = 123 } = sourceObject;",
env: { es6: true },
errors: [
{ messageId: "noMagic", data: { raw: "123" }, line: 1 }
]
},
{
code: "const { param = 123 } = sourceObject;",
options: [{ ignoreDefaultValues: false }],
Expand Down

0 comments on commit 4cda76d

Please sign in to comment.