chore: Fix types in tests 35/N.

This commit is contained in:
cpojer
2026-02-17 15:46:25 +09:00
parent ed75d30ad3
commit 2a4ca7671e
8 changed files with 35 additions and 21 deletions

View File

@@ -10,8 +10,8 @@ function createStubChild() {
child.stdin = new PassThrough() as ChildProcess["stdin"];
child.stdout = new PassThrough() as ChildProcess["stdout"];
child.stderr = new PassThrough() as ChildProcess["stderr"];
child.pid = 1234;
child.killed = false;
Object.defineProperty(child, "pid", { value: 1234, configurable: true });
Object.defineProperty(child, "killed", { value: false, configurable: true, writable: true });
child.kill = vi.fn(() => true) as ChildProcess["kill"];
queueMicrotask(() => {
child.emit("spawn");

View File

@@ -21,8 +21,8 @@ function createStubChild(pid = 1234) {
child.stdin = new PassThrough() as ChildProcess["stdin"];
child.stdout = new PassThrough() as ChildProcess["stdout"];
child.stderr = new PassThrough() as ChildProcess["stderr"];
child.pid = pid;
child.killed = false;
Object.defineProperty(child, "pid", { value: pid, configurable: true });
Object.defineProperty(child, "killed", { value: false, configurable: true, writable: true });
const killMock = vi.fn(() => true);
child.kill = killMock as ChildProcess["kill"];
return { child, killMock };