Skip to content

Commit

Permalink
Chore: add more test cases for no-sequences (#14579)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed May 13, 2021
1 parent 6a2ced8 commit 086c1d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/lib/rules/no-sequences.js
Expand Up @@ -59,7 +59,11 @@ ruleTester.run("no-sequences", rule, {

// valid code with "allowInParentheses" set to `false`
{ code: "for ((i = 0, j = 0); test; );", options: [{ allowInParentheses: false }] },
{ code: "for (; test; (i++, j++));", options: [{ allowInParentheses: false }] }
{ code: "for (; test; (i++, j++));", options: [{ allowInParentheses: false }] },

// https://github.com/eslint/eslint/issues/14572
{ code: "const foo = () => { return ((bar = 123), 10) }", env: { es6: true } },
{ code: "const foo = () => (((bar = 123), 10));", env: { es6: true } }
],

// Examples of code that should trigger the rule
Expand Down

0 comments on commit 086c1d6

Please sign in to comment.