Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 93707c4

Browse filesBrowse files
Trotttargos
authored andcommitted
test: increase coverage for trace_events.js
Add a test case to increase the test coverage for lib/trace_events.js. Refs: https://codecov.io/gh/nodejs/node/src/ea7a6f9dbd05654fff3f8c474ac0f5126bc87376/lib/trace_events.js#L70...75 PR-URL: #30705 Refs: https://coverage.nodejs.org/coverage-ea7a6f9dbd05654f/lib/trace_events.js.html#L70 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 941a91d commit 93707c4
Copy full SHA for 93707c4

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-util-inspect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,8 +2543,13 @@ assert.strictEqual(
25432543
// Tracing class respects inspect depth.
25442544
try {
25452545
const trace = require('trace_events').createTracing({ categories: ['fo'] });
2546-
const actual = util.inspect({ trace }, { depth: 0 });
2547-
assert.strictEqual(actual, '{ trace: [Tracing] }');
2546+
const actualDepth0 = util.inspect({ trace }, { depth: 0 });
2547+
assert.strictEqual(actualDepth0, '{ trace: [Tracing] }');
2548+
const actualDepth1 = util.inspect({ trace }, { depth: 1 });
2549+
assert.strictEqual(
2550+
actualDepth1,
2551+
"{ trace: Tracing { enabled: false, categories: 'fo' } }"
2552+
);
25482553
} catch (err) {
25492554
if (err.code !== 'ERR_TRACE_EVENTS_UNAVAILABLE')
25502555
throw err;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.