-
-
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
Fix inconsistent name of complex values in pretty-format #4001
Conversation
This fails when I run tests locally after FAIL integration_tests/__tests__/show_config.test.js
● jest --showConfig › outputs config info and exits
- "/mocked/root/path/jest/node_modules/babel-jest/build/index.js"
+ "/mocked/root/path/jest/integration_tests/verbose_reporter/node_modules/babel-jest/build/index.js" |
Love what you're doing to make pretty-format code better and easier to approach ❤️ |
Just remembered what is the breaking change for snapshots: an empty typed array becomes |
Seems like Appveyor is unhappy about some snapshots? |
Yes, I think about 15 added/removed because of |
I will look at Jest code to see if an unintended side effect of |
Could it be caching, because no source files change in
|
* Fix inconsistent name of complex values in pretty-format * Fix accidental lint errors when editing test in jest-matcher-utils * Add test case for empty typed array * Strengthened tests for maxDepth and min options
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
Give the
return
statements inprintComplexValue
a parallel structure.min: true
option, the previous formatted valueArray []
instead of[]
for empty array (or arguments) was inconsistent with{}
for empty object. The change doesn’t affect snapshots directly, but it does affect format of Expected/Received values in Jest output when a test fails.hitMaxDepth
is true, the change to return name of typed array or constructed object instead of generic[Array]
or[Object]
doesn’t affect snapshots because defaultmaxDepth
isInfinity
but does affect Jest output when a test fails, becausemaxDepth = 10
is default.Test plan
Updated tests for
min: true
option injest-matchers
andjest-matcher-utils