-
-
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
Adds options for configuring the snapshot and inline snapshot serializers #11654
Conversation
…sicPrototype option to show literals as literals
e3e3507
to
d876255
Compare
OK, I've switched this out to have both:
As options, which expose the full set of possible options for the formatter. So, folks can also customize the color scheme too. If this feel reasonable, I can add all the snapshot fails and docs for it 👍🏻 |
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.
I think this is a sound idea 👍
cd6cbb8
to
8395cdf
Compare
cd76e67
to
32f2ca2
Compare
This solves #5660, right? |
Yes |
Is there anything missing in this PR we can help with? I'd love to enable these options! |
Codecov Report
@@ Coverage Diff @@
## master #11654 +/- ##
==========================================
- Coverage 69.00% 68.99% -0.02%
==========================================
Files 312 312
Lines 16339 16348 +9
Branches 4736 4743 +7
==========================================
+ Hits 11275 11279 +4
- Misses 5036 5041 +5
Partials 28 28
Continue to review full report at Codecov.
|
Yeah, TBH, I don't see significant value in having two different options - I don't have time this weekend but could add that next week |
Alright, that's them consolidated I think 👍🏻 |
9890f3f
to
90c2a37
Compare
jestjs/jest#11654 ...waiting for the release of jest
woooo |
* test(jest): opt-in to shorter snapshot format jestjs/jest#11654 ...waiting for the release of jest * remove usage of setImmediate (doesn't exist in browser) * make sessionStorage mock writable * update jest to latest * final update & snapshot changes * simplify lockfile * Update src/lib/__tests__/InstantSearch-test.tsx * simpler without fake timerz
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
Fixes #10730 - adds two new config options:
"inlineSnapshotFormatter"
"snapshotFormatter"
They override
PrettyFormat
options.Fixes #5660
Test Plan
yarn jest
should cover it, I added an e2e test but there's probably other ways to add (open to recommendations)Tests will fail: I didn't include all the snapshot test updates so we can bikeshed these all first.