Skip to content
Merged
Changes from all commits
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
9 changes: 7 additions & 2 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -2544,8 +2544,13 @@ assert.strictEqual(
// Tracing class respects inspect depth.
try {
const trace = require('trace_events').createTracing({ categories: ['fo'] });
const actual = util.inspect({ trace }, { depth: 0 });
assert.strictEqual(actual, '{ trace: [Tracing] }');
const actualDepth0 = util.inspect({ trace }, { depth: 0 });
assert.strictEqual(actualDepth0, '{ trace: [Tracing] }');
const actualDepth1 = util.inspect({ trace }, { depth: 1 });
assert.strictEqual(
actualDepth1,
"{ trace: Tracing { enabled: false, categories: 'fo' } }"
);
} catch (err) {
if (err.code !== 'ERR_TRACE_EVENTS_UNAVAILABLE')
throw err;
Expand Down