()
| 6 | const { channel } = require('diagnostics_channel'); |
| 7 | |
| 8 | function test() { |
| 9 | function subscribe() { |
| 10 | channel('test-gc').subscribe(function noop() {}); |
| 11 | } |
| 12 | |
| 13 | subscribe(); |
| 14 | |
| 15 | setTimeout(common.mustCall(() => { |
| 16 | global.gc(); |
| 17 | assert.ok(channel('test-gc').hasSubscribers, 'Channel must have subscribers'); |
| 18 | })); |
| 19 | } |
| 20 | |
| 21 | test(); |
no test coverage detected
searching dependent graphs…