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 prefer-snapshot-hint rule #1012

Merged
merged 4 commits into from Feb 6, 2022
Merged

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Dec 30, 2021

  • I've gone with hint instead of name as that's what the argument is called in the docs - however the docs do refer to it in a few places as "snapshot name" and it is used as part of the name. @SimenB imo it would be good to be consistent, so would be good if you could weigh in on if you'd prefer hint or name and I can do the legwork of making a PR to jest updating the docs and argument(s) to match
  • I've not implemented the never option because I really don't think that is something people should be doing since there's no gain in not having a hint.
  • I've set multi as the default because I think that is reasonable to assume the test title has enough context for one external snapshot matcher, but as soon as you have multiple in a single test you can't tell what each snapshot actually is from the snap along without a hint.

Resolves #103

@G-Rath G-Rath requested a review from SimenB December 30, 2021 21:13
@G-Rath G-Rath force-pushed the create-prefer-snapshot-hint-rule branch 3 times, most recently from ebb1e39 to 41c7c39 Compare January 15, 2022 20:38
@G-Rath G-Rath force-pushed the create-prefer-snapshot-hint-rule branch from 41c7c39 to 2533443 Compare January 24, 2022 23:57
@G-Rath G-Rath force-pushed the create-prefer-snapshot-hint-rule branch from ebc3e00 to 94d72dc Compare February 5, 2022 22:33
@G-Rath G-Rath force-pushed the create-prefer-snapshot-hint-rule branch from 94d72dc to 46e9497 Compare February 6, 2022 21:30
@G-Rath G-Rath merged commit d854723 into main Feb 6, 2022
@G-Rath G-Rath deleted the create-prefer-snapshot-hint-rule branch February 6, 2022 21:47
github-actions bot pushed a commit that referenced this pull request Feb 6, 2022
# [26.1.0](v26.0.0...v26.1.0) (2022-02-06)

### Features

* create `no-conditional-in-test` rule ([#1027](#1027)) ([d551850](d551850))
* create `prefer-snapshot-hint` rule ([#1012](#1012)) ([d854723](d854723))
* deprecate `no-if` in favor of `no-conditional-in-test` ([#1049](#1049)) ([35f32cc](35f32cc))
@github-actions
Copy link

github-actions bot commented Feb 6, 2022

🎉 This PR is included in version 26.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 named-snapshot
1 participant