( id: string, command: string, )
| 67 | } |
| 68 | |
| 69 | async function exec( |
| 70 | id: string, |
| 71 | command: string, |
| 72 | ): Promise<{ exitCode: number; stdout: string; stderr: string }> { |
| 73 | const url = new URL("http://test/exec"); |
| 74 | url.searchParams.set("id", id); |
| 75 | url.searchParams.set("command", command); |
| 76 | const res = await SELF.fetch(url); |
| 77 | if (!res.ok) throw new Error(`exec failed: ${res.status} ${await res.text()}`); |
| 78 | return res.json(); |
| 79 | } |
| 80 | |
| 81 | describe("WorkerShellBackend end-to-end", () => { |
| 82 | // Per-test timeouts come from vitest.config.worker-backend.ts's |
no test coverage detected