Skip to content

Commit 3d47ad2

Browse files
Merge pull request #891 from mikewheeleer/codex/predictify-823
test: cover mounted health integration route
2 parents c5a8c1d + bb3dfc3 commit 3d47ad2

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/integration/health.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ describe("Integration Test: /api/health", () => {
3737
});
3838

3939
describe("GET /api/health", () => {
40+
it("serves the health payload through the mounted API route", async () => {
41+
const res = await request(app)
42+
.get("/api/health")
43+
.set("x-request-id", "integration-health-823");
44+
45+
expect(res.status).toBe(200);
46+
expect(res.body).toMatchObject({
47+
status: "ok",
48+
state: { mode: "active", maintenance: false },
49+
});
50+
expect(res.headers["x-request-id"]).toBe("integration-health-823");
51+
});
52+
4053
it("returns 200 with default health state when no audit log mutations exist", async () => {
4154
const res = await request(app).get("/api/health");
4255

0 commit comments

Comments
 (0)