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

Add rule to remove useless awaits used with expect #306

Closed
rafiazman opened this issue Jul 25, 2024 · 3 comments
Closed

Add rule to remove useless awaits used with expect #306

rafiazman opened this issue Jul 25, 2024 · 3 comments
Labels

Comments

@rafiazman
Copy link

Playwright assertions (https://playwright.dev/docs/test-assertions) are split into auto-retrying assertions and non-retrying assertions.

A new rule can be created perhaps with the name no-useless-await-expect that would disallow unnecessary awaits for Playwright expects.

Example of incorrect code:

await expect(true).toBeTruthy()

Example of correct code:

expect(true).toBeTruthy()
@antebudimir
Copy link

+1 for this rule.

Copy link

🎉 This issue has been resolved in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@antebudimir
Copy link

Thanks for the effort! 🍻

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

No branches or pull requests

2 participants