summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/parallel/test-util-inspect.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index 454dfd9001..fd699c85f0 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -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;