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

Rule: enforce await for expect.poll and expect.element #496

Open
sheremet-va opened this issue Aug 9, 2024 · 1 comment
Open

Rule: enforce await for expect.poll and expect.element #496

sheremet-va opened this issue Aug 9, 2024 · 1 comment

Comments

@sheremet-va
Copy link
Member

Both expect.poll and expect.element always return async assertions. It would be nice to enforce await before them:

- expect.poll(() => getElement()).toBeVisible()
+ await expect.poll(() => getElement()).toBeVisible()
@cardoso
Copy link
Contributor

cardoso commented Nov 11, 2024

I think this is related: #569

It's only a straight port from jest's implementation and tests, but it could support this with some tweaks on top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants