-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Indented inline snapshots. #8198
Indented inline snapshots. #8198
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8198 +/- ##
==========================================
+ Coverage 62.3% 62.31% +0.01%
==========================================
Files 265 265
Lines 10473 10524 +51
Branches 2542 2554 +12
==========================================
+ Hits 6525 6558 +33
- Misses 3366 3383 +17
- Partials 582 583 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! It'll look way better indented. Just left a single inline comment.
Could you add a changelog entry?
Co-Authored-By: scotthovestadt <scotthovestadt@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really cool and like a very solid impl, thanks @scotthovestadt! Left a few comments inline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE 😎
Nice! I've always wanted this to be what inline snapshots look like, and you have made this a ton easier. The next step for inline snapshots is to drop pretty-format and just put the concrete value into the right hand side, like |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Inline snapshots are currently ugly. Not only are they not indented by default, but the matcher will fail if you indent them manually. This PR adds support for indented inline snapshots.
A few things to note:
When/if this PR is accepted, I'll be trying to make a PR into Prettier for better UX, since Prettier won't currently update your inline snapshots formatting automatically.
Test plan