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-conditional-expect does not handle .each()() #809

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

no-conditional-expect does not handle .each()() #809

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

Comments

@G-Rath
Copy link
Collaborator

G-Rath commented Apr 4, 2021

i.e

it.each()(foo', () => {
  something || expect(something).toHaveBeenCalled();
})

and other conditional variants don't trigger no-conditional-expect.

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.

@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant