From c7020c2edcb09792b65eb91b69b321b128a1e9f3 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Fri, 13 Dec 2024 22:30:26 -0800 Subject: [PATCH] Make --expose gc work in nodetests --- test/js/node/test/common/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/js/node/test/common/index.js b/test/js/node/test/common/index.js index 9a044595e8..c5822beb34 100644 --- a/test/js/node/test/common/index.js +++ b/test/js/node/test/common/index.js @@ -119,6 +119,10 @@ if (process.argv.length === 2 && // If the binary is build without `intl` the inspect option is // invalid. The test itself should handle this case. (process.features.inspector || !flag.startsWith('--inspect'))) { + if (flag === "--expose-gc" && process.versions.bun) { + globalThis.gc ??= Bun.gc; + continue; + } console.log( 'NOTE: The test started as a child_process using these flags:', inspect(flags),