Skip to content

Commit

Permalink
One more case
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 25, 2020
1 parent d8c342f commit 231eed9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/no-for-loop.js
Expand Up @@ -526,6 +526,19 @@ ruleTester.run('no-for-loop', rule, {
}
}
`),
testCase(outdent`
for (let i = 0; i < arr.length; i += 1) {
function element_(element) {
console.log(arr[i], element);
}
}
`, outdent`
for (const element__ of arr) {
function element_(element) {
console.log(element__, element);
}
}
`),
testCase(outdent`
for (let i = 0; i < arr.length; i += 1) {
function element() {
Expand Down

0 comments on commit 231eed9

Please sign in to comment.