(api: HttpApi.HttpApi<"Api", typeof Group>)
| 265 | }) |
| 266 | ) |
| 267 | const events = (api: HttpApi.HttpApi<"Api", typeof Group>) => |
| 268 | HttpApiClient.makeWith(api, { |
| 269 | baseUrl: "http://test", |
| 270 | httpClient: clientFromResponse(() => |
| 271 | new Response(textStream([`data: ${JSON.stringify(adaWithExtra)}\n\n`]), { |
| 272 | headers: { "content-type": "text/event-stream", "x-count": "1" } |
| 273 | }) |
| 274 | ) |
| 275 | }).pipe( |
| 276 | Effect.flatMap((client) => client.test.events({})), |
| 277 | Effect.flatMap(({ body, headers }) => |
| 278 | Effect.map(Stream.runCollect(body), (events) => ({ events, headers })) |
| 279 | ), |
| 280 | Effect.exit |
| 281 | ) |
| 282 | |
| 283 | const api = HttpApi.make("Api").add(Group) |
| 284 | .annotate(HttpApi.ParseOptions, Strict) |
no test coverage detected