Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/internal/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);

const inspectDefaultOptions = Object.seal({
showHidden: false,
depth: 20,
depth: 5,
colors: false,
customInspect: true,
showProxy: false,
Expand Down
8 changes: 1 addition & 7 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1565,15 +1565,9 @@ util.inspect(process);
head = head.next = {};
}

const res = Array(15)
.fill(0)
.map((_, i) => `{ next:\n${' '.repeat(i + 1)}`)
.join('') +
'{ next: { next: { next: { next: { next: { next:' +
' [Object] } } } } } } } } } } } } } } } } } } } } }';
assert.strictEqual(
util.inspect(list),
res
'{ next: { next: { next: { next: { next: { next: [Object] } } } } } }'
);
const longList = util.inspect(list, { depth: Infinity });
const match = longList.match(/next/g);
Expand Down