diff --git a/extensions/qa-matrix/src/shared/live-transport-cli.runtime.test.ts b/extensions/qa-matrix/src/shared/live-transport-cli.runtime.test.ts index 71836c696b6..dab18507bff 100644 --- a/extensions/qa-matrix/src/shared/live-transport-cli.runtime.test.ts +++ b/extensions/qa-matrix/src/shared/live-transport-cli.runtime.test.ts @@ -56,7 +56,14 @@ describe("live transport CLI runtime", () => { outputDir, }); process.stdout.write("stdout marker\n"); - await expect(tee.stop()).rejects.toMatchObject({ code: "EISDIR" }); + let stopError: unknown; + try { + await tee.stop(); + } catch (caught) { + stopError = caught; + } + expect(stopError).toBeInstanceOf(Error); + expect((stopError as NodeJS.ErrnoException).code).toBe("EISDIR"); expect(process.stdout.write).toBe(mutedStdoutWrite); expect(process.stderr.write).toBe(mutedStderrWrite);