-
Notifications
You must be signed in to change notification settings - Fork 242
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
[expect-expect] reports the entire test as erroneous #539
Comments
@DanielSWolf we report the callback as being node that is erroneous, as that is where the error lies (not in the test expression). You'll want to create a new issue for your editor, as we don't control how the errors are rendered. For reference, IntelliJ/WebStorm does render the error as you'd like: To be honest, I'd like to report the callback rather than the |
🎉 This issue has been resolved in version 27.4.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Within each unit test, the actual
expect
statement usually follows some amount of setup. As long as I'm writing this setup code, the test is technically invalid according to theexpect-expect
rule because it doesn't include anyexpect
s. However, this means that about 80% of the time I spend writing unit tests, the entire function I'm writing is disfigured with red squigglies:This doesn't just look bad. It also hides any actual errors I may have made. Only when I type the first
expect
do I see whether there are any other problems with my code.Would it be possible for this rule to report only part of the test function as erroneous? For instance, just the
it
? Here's a mockup of how this might look:The text was updated successfully, but these errors were encountered: