Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
RuleTester could use nested describes() for valid vs invalid rules #4907
At present, the RuleTester hierarchy (in mocha) looks like this:
In other words, valid and invalid cases are all flat, immediately under the rule description. The problem I have with this is I can't immediately tell at a glance which cases are valid and which are invalid. (I know that all invalid ones are after all valid ones, but I don't know where the "line" is in between valid and invalid cases and the cases are not prefixed with valid/invalid.)
I would like to add a level of nesting to make the output a little more readable without adding a ton of noise. My proposed hierarchy is this:
This should be a fairly simple change to rule-tester. Hopefully the unit tests won't be too hard to do either.
EDIT (in response to @eslintbot):
@platinumazure Thanks for the issue! If you're reporting a bug, please be sure to include:
Requesting a new rule? Please see Proposing a New Rule for instructions.