node/test/parallel/test-weakref.js
Antoine du Hamel a9e70cefb0
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60634
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-02-22 23:16:05 +01:00

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