Skip to content

Commit dd6be92

Browse files
committed
fixup! util: add comment explaining stackTraceLimit override in test
See https://github.com/nodejs/node/pull/60684/files#r2553166047
1 parent a683626 commit dd6be92

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/parallel/test-util-inspect.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
690690

691691
{
692692
const tmp = Error.stackTraceLimit;
693+
// Force stackTraceLimit = 0 for this test, but make it non-enumerable
694+
// so it doesn't appear in inspect() output when inspecting Error in other tests.
693695
Object.defineProperty(Error, 'stackTraceLimit', { value: 0, enumerable: false });
694696
const err = new Error('foo');
695697
const err2 = new Error('foo\nbar');

0 commit comments

Comments
 (0)