(request: Request)
| 660 | describe("fromWebHandler", () => { |
| 661 | test("basic GET request", async () => { |
| 662 | const webHandler = async (request: Request) => { |
| 663 | return new Response(`Hello from ${request.url}`, { |
| 664 | status: 200, |
| 665 | headers: { "Content-Type": "text/plain" } |
| 666 | }) |
| 667 | } |
| 668 | const app = HttpEffect.fromWebHandler(webHandler) |
| 669 | const handler = HttpEffect.toWebHandler(app) |
| 670 | const response = await handler(new Request("http://localhost:3000/hello")) |