import Fastify from 'fastify'; import { describe, expect, it } from 'vitest'; import { healthRoutes } from '../src/routes/health.js'; describe('GET /health', () => { it('répond 200 avec un statut ok', async () => { const app = Fastify(); await app.register(healthRoutes); const response = await app.inject({ method: 'GET', url: '/health' }); expect(response.statusCode).toBe(200); expect(response.json()).toMatchObject({ status: 'ok' }); }); });