(request: Request)
| 164 | describe("fromWebHandler", () => { |
| 165 | test("basic GET request", async () => { |
| 166 | const webHandler = async (request: Request) => { |
| 167 | return new Response(`Hello from ${request.url}`, { |
| 168 | status: 200, |
| 169 | headers: { "Content-Type": "text/plain" } |
| 170 | }) |
| 171 | } |
| 172 | const app = HttpEffect.fromWebHandler(webHandler) |
| 173 | const handler = HttpEffect.toWebHandler(app) |
| 174 | const response = await handler(new Request("http://localhost:3000/hello")) |