From e02a3611b06ea025899fecaf02ad4e6244a997f3 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 17 Sep 2026 13:04:21 -0700 Subject: [PATCH] test(process): define synthetic child stdio state (#151096) --- test/scripts/managed-child-process.termination.test.ts | 2 ++ test/scripts/managed-child-process.tree.test.ts | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/scripts/managed-child-process.termination.test.ts b/test/scripts/managed-child-process.termination.test.ts index 36ad02f0343c..f69f7184cee6 100644 --- a/test/scripts/managed-child-process.termination.test.ts +++ b/test/scripts/managed-child-process.termination.test.ts @@ -18,6 +18,8 @@ function createChild() { Object.defineProperties(child, { pid: { value: 12345 }, exitCode: { get: () => exitCode }, + stdout: { value: null, writable: true }, + stderr: { value: null, writable: true }, }); return { child, diff --git a/test/scripts/managed-child-process.tree.test.ts b/test/scripts/managed-child-process.tree.test.ts index 6a12f1fb3ac4..e21ffad3eb20 100644 --- a/test/scripts/managed-child-process.tree.test.ts +++ b/test/scripts/managed-child-process.tree.test.ts @@ -46,7 +46,12 @@ it("cancels admission while Windows platform code loads without spawning or reta it("preserves requested command inputs across Windows platform loading", async () => { const root = dirs.make("managed-platform-inputs-"); const child = new ChildProcess(); - Object.defineProperties(child, { pid: { value: 12345 }, exitCode: { value: 0 } }); + Object.defineProperties(child, { + pid: { value: 12345 }, + exitCode: { value: 0 }, + stdout: { value: null, writable: true }, + stderr: { value: null, writable: true }, + }); let launched: { argument?: string; value?: string } | undefined; mocks.spawnWindowsJobChild.mockImplementation((_command, args, options) => { launched = { argument: args[0], value: options.env.VALUE };