import { describe, it, expect } from 'vitest' import { buildApp } from '../src/app.js' import { openDatabase } from '../src/db.js' import { testConfig } from './helpers.js' const config = testConfig() describe('GET /api/health', () => { it('returns ok', async () => { const db = openDatabase(':memory:') const app = await buildApp({ db, config }) const res = await app.inject({ method: 'GET', url: '/api/health' }) expect(res.statusCode).toBe(200) expect(res.json()).toEqual({ ok: true }) await app.close() }) })