diff --git a/.gitignore b/.gitignore index 13dcca1b..111787bd 100644 --- a/.gitignore +++ b/.gitignore @@ -181,3 +181,6 @@ log.txt # Testing iteration temp files tmp/ + +# Coding agent artifacts +.agent/ diff --git a/apps/server/src/api/routes/health.ts b/apps/server/src/api/routes/health.ts index 61471ee2..9d559b71 100644 --- a/apps/server/src/api/routes/health.ts +++ b/apps/server/src/api/routes/health.ts @@ -8,6 +8,6 @@ import { Hono } from 'hono' export function createHealthRoute() { return new Hono().get('/', (c) => { - return c.json({ status: 'ok' }) + return c.json({ status: 'ok', uptime: process.uptime() }) }) } diff --git a/apps/server/tests/api/routes/health.test.ts b/apps/server/tests/api/routes/health.test.ts index 56cdd537..de842b39 100644 --- a/apps/server/tests/api/routes/health.test.ts +++ b/apps/server/tests/api/routes/health.test.ts @@ -15,6 +15,8 @@ describe('createHealthRoute', () => { assert.strictEqual(response.status, 200) const body = await response.json() - assert.deepStrictEqual(body, { status: 'ok' }) + assert.strictEqual(body.status, 'ok') + assert.strictEqual(typeof body.uptime, 'number') + assert.ok(body.uptime >= 0) }) })