From cf653fcc463951db7a2d41a6e9c377f80756468c Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 17 Nov 2026 16:34:44 +0100 Subject: [PATCH] test: make test-v8-collect-gc-profile-minor-ms more robust There can be more than one garbage collection triggered by one gc() call and it's not controllable by Node.js. Update the assertion to check that at least one expected GC is there, but don't check that there aren't more. Signed-off-by: Joyee Cheung --- test/parallel/test-v8-collect-gc-profile-minor-ms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-v8-collect-gc-profile-minor-ms.js b/test/parallel/test-v8-collect-gc-profile-minor-ms.js index 1f00470da6c1..848caeb733a1 100644 --- a/test/parallel/test-v8-collect-gc-profile-minor-ms.js +++ b/test/parallel/test-v8-collect-gc-profile-minor-ms.js @@ -10,7 +10,7 @@ profiler.start(); global.gc({ type: 'minor', execution: 'sync' }); const profile = profiler.stop(); -assert.deepStrictEqual( +assert.partialDeepStrictEqual( profile.statistics.map(({ gcType }) => gcType), ['MinorMarkSweep'], );