import { describe, it, expect } from 'vitest'; import { Hono } from 'hono'; import { healthRoute } from '../src/routes/health.ts'; describe('health routes', () => { const app = new Hono(); app.route('/', healthRoute); it('GET /healthz returns ok', async () => { const res = await app.request('/healthz'); expect(res.status).toBe(200); const body = (await res.json()) as { status: string }; expect(body.status).toBe('ok'); }); it('GET /version returns app + version + build', async () => { const res = await app.request('/version'); expect(res.status).toBe(200); const body = (await res.json()) as { app: string; version: string; build: string }; expect(body.app).toBe('cards'); expect(body.version).toBeTruthy(); expect(body.build).toBeTruthy(); }); });