(route: string, directory: string, init: RequestInit = {})
| 18 | const testPty = process.platform === "win32" ? test.skip : test |
| 19 | |
| 20 | function request(route: string, directory: string, init: RequestInit = {}) { |
| 21 | const headers = new Headers(init.headers) |
| 22 | headers.set("x-opencode-directory", directory) |
| 23 | return HttpApiApp.webHandler().handler( |
| 24 | new Request(`http://localhost${route}`, { |
| 25 | ...init, |
| 26 | headers, |
| 27 | }), |
| 28 | context, |
| 29 | ) |
| 30 | } |
| 31 | |
| 32 | const testStateLayer = Layer.effectDiscard( |
| 33 | Effect.gen(function* () { |
no test coverage detected