From cadfd9c88e01e0292294f84f11b853924e814242 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 6 May 2024 15:39:31 -0700 Subject: [PATCH] test: unflake "should report browser close signal 2" (#30681) --- tests/library/signals.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/library/signals.spec.ts b/tests/library/signals.spec.ts index 232db694f3..70f7eb51f1 100644 --- a/tests/library/signals.spec.ts +++ b/tests/library/signals.spec.ts @@ -64,9 +64,9 @@ test.describe('signals', () => { const pid = await remoteServer.out('pid'); process.kill(-pid, 'SIGKILL'); if (isMac && browserName === 'webkit' && parseInt(os.release(), 10) > 22 && os.arch() === 'arm64') { - // WebKit on newer macOS exits differently. - expect(await remoteServer.out('exitCode')).toBe('137'); - expect(await remoteServer.out('signal')).toBe('null'); + // WebKit on newer macOS exits sometimes with exit code, sometimes with signal. + expect('exitCode:' + await remoteServer.out('exitCode') + + 'signal:' + await remoteServer.out('signal')).toMatch(/exitCode:137|signal:SIGKILL/); } else { expect(await remoteServer.out('exitCode')).toBe('null'); expect(await remoteServer.out('signal')).toBe('SIGKILL');