-
-
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
[jest-each] Add pretty format #6357
Conversation
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.
that looks so dope! thanks for adding this feature! :)
${[{foo: {bar: 'baz'}}]} | ${[{foo: {bar: 'baz'}}]} | ||
${Infinity} | ${Infinity} | ||
${-Infinity} | ${-Infinity} | ||
${NaN} | ${NaN} |
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 so amazing! 😍
I've landed the CI fix PR, if you wanna rebase |
ping @SimenB fixed the conflicts 😄 |
Codecov Report
@@ Coverage Diff @@
## master #6357 +/- ##
==========================================
+ Coverage 63.47% 63.52% +0.04%
==========================================
Files 227 227
Lines 8677 8688 +11
Branches 4 3 -1
==========================================
+ Hits 5508 5519 +11
Misses 3168 3168
Partials 1 1
Continue to review full report at Codecov.
|
docs/GlobalAPI.md
Outdated
@@ -240,6 +240,7 @@ Use `describe.each` if you keep duplicating the same test suites with different | |||
- `%j` - JSON. | |||
- `%o` - Object. | |||
- `%%` - single percent sign ('%'). This does not consume an argument. | |||
- `%p` - [pretty-format](https://www.npmjs.com/package/pretty-format). |
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.
Maybe we should add it as a first option, so it's easily discoverable?
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.
@thymikee done 😄
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
Use pretty format to interpolate test titles with given data.
Closes #6321
/cc @aaronabramov @SimenB
Do you guys think we need to trim serialising large datasets?
Test plan