-
Notifications
You must be signed in to change notification settings - Fork 248
Closed
Description
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 the expect-expect rule because it doesn't include any expects. 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:
jeffvandyke and remcohaszing

