Skip to content

Commit 07e7e97

Browse files
committed
test: finalize diagnostics_channel suppression test
Signed-off-by: Divyanshu Sharma <divyanshu88999@gmail.com>
1 parent 8e6d7cb commit 07e7e97

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

test/parallel/test-diagnostics-channel-suppression.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ const { AsyncLocalStorage } = require('async_hooks');
7777
ch.subscribe(h1, { subscriberId: k1 });
7878
ch.subscribe(h2, { subscriberId: k2 });
7979

80-
suppressed(k1, () => {
81-
// inside k1, h1 skipped, h2 runs
80+
suppressed(k1, common.mustSucceed(() => {
81+
// Inside k1, h1 skipped, h2 runs
8282
ch.publish({});
8383
assert.strictEqual(h2Calls, 1);
8484

85-
suppressed(k2, () => {
86-
// inside both, both skipped
85+
suppressed(k2, common.mustSucceed(() => {
86+
// Inside both, both skipped
8787
ch.publish({});
8888
assert.strictEqual(h2Calls, 1);
89-
});
89+
}));
9090

91-
// back to only k1
91+
// Back to only k1
9292
ch.publish({});
9393
assert.strictEqual(h2Calls, 2);
94-
});
94+
}));
9595

9696
ch.unsubscribe(h1);
9797
ch.unsubscribe(h2);
@@ -188,12 +188,12 @@ const { AsyncLocalStorage } = require('async_hooks');
188188
{
189189
const key = Symbol('return');
190190
const receiver = { value: 41 };
191-
const result = suppressed(key, function(a, b) {
191+
const result = suppressed(key, common.mustSucceed(function(a, b) {
192192
assert.strictEqual(this, receiver);
193193
assert.strictEqual(a, 'a');
194194
assert.strictEqual(b, 'b');
195195
return this.value + 1;
196-
}, receiver, 'a', 'b');
196+
}), receiver, 'a', 'b');
197197
assert.strictEqual(result, 42);
198198
}
199199

0 commit comments

Comments
 (0)