Skip to content
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

Fix: Detect nested test cases #249

Merged
merged 8 commits into from May 16, 2022
Merged

Fix: Detect nested test cases #249

merged 8 commits into from May 16, 2022

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented May 14, 2022

I think this should cover most cases though it'd be easier if we were walking the AST tree like ESLint actually does, since really what we're wanting to do is check the body of all BlockStatement expressions but without walking we have to manually account for every possible place that could be held.

Still this already I think is a huge improvement - I've tried it on eslint-plugin-jest and it caught a few violations (including a couple I'd not noticed myself!)

Resolves #248

Copy link
Member

@bmish bmish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bmish bmish added the bug label May 15, 2022
@bmish bmish changed the title New: improve rule tester searching Fix: Detect nested test cases May 15, 2022
Copy link
Contributor

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@aladdin-add aladdin-add merged commit b33aa00 into eslint-community:main May 16, 2022
@G-Rath G-Rath deleted the improve-rule-tester-searching branch May 16, 2022 02:41
@G-Rath
Copy link
Contributor Author

G-Rath commented May 16, 2022

No problem! Feel free to ping me if anyone reports any bugs or further improves as a result of this :)

@aladdin-add
Copy link
Contributor

released in v4.2.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuleTester detection seems like it could use improving
3 participants