We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
prefer-to-comparison
Prefer expect(a).toBeGreaterThan(b) rather than expect(a > b).toBe(true), which has a better error message.
expect(a).toBeGreaterThan(b)
expect(a > b).toBe(true)
Also the same with:
expect(a).toBeGreaterThanOrEqual(b)
expect(a).toBeLessThan(b)
expect(a).toBeLessThanOrEqual(b)
The text was updated successfully, but these errors were encountered:
Should this be a new rule, or part of prefer-to-be 🤔
prefer-to-be
Sorry, something went wrong.
I felt this is simillar to prefer-to-contain, so I thought this should be a new rule.
prefer-to-contain
prefer-comparison-matcher
🎉 This issue has been resolved in version 25.6.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
Successfully merging a pull request may close this issue.
Prefer
expect(a).toBeGreaterThan(b)
rather thanexpect(a > b).toBe(true)
, which has a better error message.Also the same with:
expect(a).toBeGreaterThanOrEqual(b)
expect(a).toBeLessThan(b)
expect(a).toBeLessThanOrEqual(b)
The text was updated successfully, but these errors were encountered: