Skip to content

prefer-wait-for Catches Unrelated Functions #145

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

Closed
HaveSpacesuit opened this issue May 26, 2020 · 1 comment · Fixed by #181
Closed

prefer-wait-for Catches Unrelated Functions #145

HaveSpacesuit opened this issue May 26, 2020 · 1 comment · Fixed by #181
Labels
bug Something isn't working released

Comments

@HaveSpacesuit
Copy link

The testing-library/prefer-wait-for rule catches calls to any function named wait, even if not referencing the wait exported from testing-library.

// someNonTestFile.ts

async function wait(): Promise<any> {
  // doesn't matter
}

function callsWait(): void {
  await wait(); // Linter complains "`wait` is deprecated in favor of `waitFor` eslint(testing-library/prefer-wait-for)"
}
@timdeschryver timdeschryver added the bug Something isn't working label May 26, 2020
timdeschryver added a commit that referenced this issue Jun 20, 2020
nickserv pushed a commit that referenced this issue Jun 20, 2020
@Belco90
Copy link
Member

Belco90 commented Jul 20, 2020

🎉 This issue has been resolved in version 3.3.2 🎉

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 Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants