Skip to content

Commit

Permalink
Test: default option no-magic-numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
moeriki committed Jun 26, 2020
1 parent 1039266 commit 47a92cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/lib/rules/no-magic-numbers.js
Expand Up @@ -740,6 +740,14 @@ ruleTester.run("no-magic-numbers", rule, {
{ messageId: "noMagic", data: { raw: "100" }, line: 1 }
]
},
{
code: "const { param = 123 } = sourceObject;",
options: [{}],
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 47a92cd

Please sign in to comment.