mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 12:10:08 +01:00
2d40e3fc4c
Fixes: https://github.com/nodejs/node/issues/36598 PR-URL: https://github.com/nodejs/node/pull/36599 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
11 lines
263 B
JavaScript
11 lines
263 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { channel, hasSubscribers } = require('diagnostics_channel');
|
|
|
|
const dc = channel('test');
|
|
assert.ok(!hasSubscribers('test'));
|
|
|
|
dc.subscribe(() => {});
|
|
assert.ok(hasSubscribers('test'));
|