@@ -63,17 +63,20 @@ try {
6363 const baseTimeout = 300000 ; // 5 minutes base
6464 const multiplier = getTimingMultiplier ( ) ;
6565 const timeout = baseTimeout * multiplier ;
66-
67- console . log ( `Debug: Using timeout: ${ timeout } ms (${ baseTimeout } ms base × ${ multiplier } multiplier)` ) ;
68-
66+
67+ console . log (
68+ `Debug: Using timeout: ${ timeout } ms (${ baseTimeout } ms base × ${ multiplier } multiplier)` ,
69+ ) ;
70+
6971 execFileSync ( nodeExe , args , {
7072 stdio : "inherit" ,
7173 env : {
7274 ...process . env ,
7375 TEST_MEMORY : "1" ,
7476 // Run memory tests in CJS mode to avoid Jest ESM hanging issue
7577 // TEST_ESM: "1",
76- NODE_OPTIONS : "--expose-gc --no-warnings" ,
78+ NODE_OPTIONS :
79+ ( process . env . NODE_OPTIONS ?? "" ) + " --expose-gc --no-warnings" ,
7780 // Force Jest to exit after test completion
7881 FORCE_EXIT : "1" ,
7982 } ,
@@ -98,7 +101,7 @@ if (os.platform() === "linux") {
98101 try {
99102 execFileSync ( "which" , [ "valgrind" ] , { stdio : "ignore" } ) ;
100103 console . log ( color ( colors . YELLOW , "\nRunning valgrind memory analysis..." ) ) ;
101-
104+
102105 // Run debug script first in CI to gather more information
103106 if ( process . env . GITHUB_ACTIONS ) {
104107 console . log ( "Running debug memory leak script..." ) ;
@@ -110,7 +113,7 @@ if (os.platform() === "linux") {
110113 console . log ( "Debug script failed (continuing anyway)" ) ;
111114 }
112115 }
113-
116+
114117 try {
115118 const valgrindScript = path . join ( __dirname , "valgrind-test.sh" ) ;
116119 execFileSync ( "/bin/bash" , [ valgrindScript ] , { stdio : "inherit" } ) ;
0 commit comments