()
| 9 | import { errorHandler } from "../../src/middleware/error-handler"; |
| 10 | |
| 11 | const buildApp = () => |
| 12 | new Elysia() |
| 13 | .onError(({ code, error, set }) => |
| 14 | errorHandler({ code: String(code), error, set }) |
| 15 | ) |
| 16 | .use(bodyLimit) |
| 17 | .post("/echo", ({ body }) => ({ ok: true, body }), { |
| 18 | body: t.Unknown(), |
| 19 | response: t.Object({ ok: t.Boolean(), body: t.Unknown() }), |
| 20 | detail: { tags: ["Test"] }, |
| 21 | }); |
| 22 | |
| 23 | const ECHO_URL = "http://localhost/echo"; |
| 24 |
no test coverage detected