mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
PR-URL: https://github.com/nodejs/node/pull/60634 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
14 lines
257 B
JavaScript
14 lines
257 B
JavaScript
'use strict';
|
|
|
|
// Flags: --expose-gc
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
const w = new globalThis.WeakRef({});
|
|
|
|
setTimeout(common.mustCall(() => {
|
|
globalThis.gc();
|
|
assert.strictEqual(w.deref(), undefined);
|
|
}), 200);
|