-
-
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
console.dir doesn't respect depth
option
#10176
Comments
@xamgore wanna provide a PR for that? Code is here: https://github.com/facebook/jest/blob/852819abc0de900f6d8ebb417e7d4fc3d7e647aa/packages/jest-console/src/CustomConsole.ts#L78-L80 |
@SimenB yeah, I'd like to. Could you, please, explain where the "util" module is located?
|
|
* fixes jestjs#10176 * repeats behaviour of the node.js Console class https://github.com/nodejs/node/blob/9918bdf5cb07f58d230522244a372cbb1b510956/lib/internal/console/constructor.js
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
According to the Node.js documentation, a
depth
option can be passed toconsole.dir
:Imagine we run the code below. Jest
26.0.0
sequentially prints the arguments with depth 3 and ignores thedepth
option.There is a stack overflow discussion with a bug explanation. Briefly,
maxDepth
option is not passed to theprettyFormat
function.The text was updated successfully, but these errors were encountered: