Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-if does not handle .each()() #810

Closed
G-Rath opened this issue Apr 4, 2021 · 1 comment · Fixed by #814
Closed

no-if does not handle .each()() #810

G-Rath opened this issue Apr 4, 2021 · 1 comment · Fixed by #814
Assignees
Labels
bug each support Relates to supporting the `each` method released rule: no-if

Comments

@G-Rath
Copy link
Collaborator

G-Rath commented Apr 4, 2021

i.e

it.each()('foo', () => {
  callExpression()
  if ('bar') {}
})

doesn't trigger no-if

This'll be because the way we track if we're in a test case or not based on CallExpression nodes.

I expect it'll be fixed by the refactor I described here, which'll change the node we return true on.

@G-Rath G-Rath self-assigned this Apr 4, 2021
@G-Rath G-Rath added the each support Relates to supporting the `each` method label Apr 4, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 24.3.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug each support Relates to supporting the `each` method released rule: no-if
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant