Querying Effect HttpApi for Unit Tests without running server
Hi Effect team, first off, thanks for the amazing work on Effect!
I’ve built my first HttpApi server using
My question is about unit testing. To query the API, I currently need to launch the server with
This would be super helpful for streamlining my test setup. Thanks!
@effect/platform-bun, and the dev experience has been fantastic. Here’s a simplified version of my setup:My question is about unit testing. To query the API, I currently need to launch the server with
Layer.launch(ServerLive).pipe(BunRuntime.runMain). For end-to-end tests, I want to test the actual business logic against a real test database (cleaned between tests), not mock the server. Is there a way to query the API directly without spinning up the server, similar to how Hono’s test client works (e.g., const res = await app.request('/posts'))?This would be super helpful for streamlining my test setup. Thanks!
