node/test/parallel/test-weakref.js
Antoine du Hamel 2856475f3e
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60634
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-15 13:16:37 +00:00

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);