Skip to content

Commit

Permalink
test: increase coverage for diagnostics_channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Lxxyx committed Dec 22, 2020
1 parent 656ce92 commit 5530293
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ channel.publish(input);
// Should not publish after subscriber is unsubscribed
channel.unsubscribe(subscriber);
assert.ok(!channel.hasSubscribers);

assert.throws(() => {
channel.subscribe(null);
}, /ERR_INVALID_ARG_TYPE/);
6 changes: 6 additions & 0 deletions test/parallel/test-diagnostics-channel-symbol-named.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ channel.subscribe(common.mustCall((message, name) => {
}));

channel.publish(input);

{
assert.throws(() => {
dc.channel(null);
}, /ERR_INVALID_ARG_TYPE/);
}

0 comments on commit 5530293

Please sign in to comment.