mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

Refs: 2741582
PR-URL: https://github.com/nodejs/node/pull/37671
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
13 lines
225 B
JavaScript
13 lines
225 B
JavaScript
'use strict';
|
|
|
|
// Flags: --expose-gc
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const w = new globalThis.WeakRef({});
|
|
|
|
setTimeout(() => {
|
|
globalThis.gc();
|
|
assert.strictEqual(w.deref(), undefined);
|
|
}, 200);
|