mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
PR-URL: https://github.com/nodejs/node/pull/59910 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
24 lines
427 B
JavaScript
24 lines
427 B
JavaScript
// Flags: --expose-gc
|
|
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { channel } = require('diagnostics_channel');
|
|
|
|
function test() {
|
|
const testChannel = channel('test-gc');
|
|
|
|
setTimeout(() => {
|
|
const testChannel2 = channel('test-gc');
|
|
|
|
assert.ok(testChannel === testChannel2, 'Channel instances must be the same');
|
|
});
|
|
}
|
|
|
|
test();
|
|
|
|
setTimeout(() => {
|
|
global.gc();
|
|
test();
|
|
}, 10);
|