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

feat: create max-expects rule #1166

Merged
merged 11 commits into from Jul 14, 2022
Merged

Conversation

makotot
Copy link
Contributor

@makotot makotot commented Jul 13, 2022

Closes #1163.
I have added the new rules proposed in #1163. The default value of max option is the same value as in eslint-plugin-ava.

@SimenB SimenB requested a review from G-Rath July 13, 2022 14:19
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

Looks good - got a few tweaks to make, and we need a few more test cases to get full coverage e.g. used with describe, multiple test blocks in the same "file", and one with test.each would probably good too.

src/rules/max-expects.ts Outdated Show resolved Hide resolved
src/rules/max-expects.ts Outdated Show resolved Hide resolved
src/rules/max-expects.ts Outdated Show resolved Hide resolved
src/rules/max-expects.ts Outdated Show resolved Hide resolved
src/rules/max-expects.ts Outdated Show resolved Hide resolved
@makotot
Copy link
Contributor Author

makotot commented Jul 14, 2022

@G-Rath
Thanks for the review!
When I added more tests to meet coverage, I found that the implementation for multiple "test" blocks was incorrect, so have added 79bb734 to fix it.

@makotot makotot requested a review from G-Rath July 14, 2022 17:19
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

awesome work!

@G-Rath G-Rath merged commit 5b6fd20 into jest-community:main Jul 14, 2022
github-actions bot pushed a commit that referenced this pull request Jul 14, 2022
# [26.6.0](v26.5.3...v26.6.0) (2022-07-14)

### Features

* create `max-expects` rule ([#1166](#1166)) ([5b6fd20](5b6fd20))
@github-actions
Copy link

🎉 This PR is included in version 26.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@makotot makotot deleted the create-max-expects branch July 15, 2022 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New rule: max-expects
2 participants