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

await expect - new false positive in 1.8.0 #323

Closed
dylang opened this issue Oct 20, 2024 · 2 comments
Closed

await expect - new false positive in 1.8.0 #323

dylang opened this issue Oct 20, 2024 · 2 comments
Labels

Comments

@dylang
Copy link

dylang commented Oct 20, 2024

Hi, it looks like the work done in e283efc is not correctly supporting async matchers.

For example, this is now considered incorrect usage of await:

await expect(pageObject.tabTo('.first', '.third', { maxCount: 1 })).rejects.toThrow(
  'Could not reach the selector .third using the keyboard'
);
@mdmower
Copy link

mdmower commented Oct 21, 2024

I'm similarly seeing what I believe are false positives for expect.poll():

await expect.poll(() => getSlowStorageValue(page, 'key')).toBe('value');
// warning  Unnecessary await expression. This method does not return a Promise  playwright/no-useless-await

Documentation implies await is needed: https://playwright.dev/docs/test-assertions#expectpoll

Copy link

🎉 This issue has been resolved in version 1.8.1 🎉

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

No branches or pull requests

2 participants