Use these patterns for server and HttpApi middleware tests in this directory.
testEffect(...) with NodeHttpServer.layerTest for the primary in-test server and make relative HttpClient requests against it.HttpApiBuilder probe groups that declare the typed middleware under test and expose context such as WorkspaceRouteContext, InstanceRef, or WorkspaceRef.InstanceContextMiddleware followed by WorkspaceRoutingMiddleware.NodeHttpServer.layer(...) into the current test scope with Layer.build(...) so the listener stays alive until the test scope exits.Bun.serve when testing Effect HTTP middleware. Keep the test in the Effect HTTP stack unless the production path being tested is Bun-specific.Socket.makeWebSocket(...) from the test client and assert protocol forwarding or frame relay when relevant.tmpdirScoped({ git: true }) plus Project.use.fromDirectory(dir) for project-backed requests.