mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
chore: Fix types in tests 35/N.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user