diff --git a/tests/library/inspector/cli-codegen-2.spec.ts b/tests/library/inspector/cli-codegen-2.spec.ts index e87e242bfd..255daea979 100644 --- a/tests/library/inspector/cli-codegen-2.spec.ts +++ b/tests/library/inspector/cli-codegen-2.spec.ts @@ -464,7 +464,7 @@ await page1.GotoAsync("about:blank?foo");`); expect(exitCode).toBe(130); } else { // If the runner is slow enough, the process will be forcibly terminated by the signal - expect(signal === 'SIGINT' || signal === 'SIGTERM').toBeTruthy(); + expect(signal).toMatch(/SIGINT|SIGTERM/); } expect(fs.existsSync(storageFileName)).toBeTruthy(); expect(fs.existsSync(harFileName)).toBeTruthy();