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 833e614

Browse filesBrowse files
Lxxyxdanielleadams
authored andcommitted
test: increase coverage for diagnostics_channel
1. test subscribe with invalid args https://coverage.nodejs.org/coverage-21f2e8859dfbf09f/lib/diagnostics_channel.js.html#L27 2. test create channel with invalid args https://coverage.nodejs.org/coverage-21f2e8859dfbf09f/lib/diagnostics_channel.js.html#L98 PR-URL: #36602 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Pooja D P <Pooja.D.P@ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yash Ladha <yash@yashladha.in>
1 parent a53997e commit 833e614
Copy full SHA for 833e614

File tree

Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-diagnostics-channel-object-channel-pub-sub.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-diagnostics-channel-object-channel-pub-sub.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ channel.publish(input);
3737
// Should not publish after subscriber is unsubscribed
3838
channel.unsubscribe(subscriber);
3939
assert.ok(!channel.hasSubscribers);
40+
41+
assert.throws(() => {
42+
channel.subscribe(null);
43+
}, { code: 'ERR_INVALID_ARG_TYPE' });
Collapse file

‎test/parallel/test-diagnostics-channel-symbol-named.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-diagnostics-channel-symbol-named.js
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ channel.subscribe(common.mustCall((message, name) => {
2020
}));
2121

2222
channel.publish(input);
23+
24+
{
25+
assert.throws(() => {
26+
dc.channel(null);
27+
}, /ERR_INVALID_ARG_TYPE/);
28+
}

0 commit comments

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