test: make sure weak references are not GCed too early
This fixes flaky `util.inspect` tests by making sure that the inspected WeakMap and WeakSet only contains objects that still have other hard references. Otherwise the garbage collection could collect these objects to early. PR-URL: https://github.com/nodejs/node/pull/27482 Reviewed-By:Michaël Zasso <targos@protonmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
parent
f8cf9f96
Please register or sign in to comment