youtubeDownloader/server/test/health.test.ts
Nicolas 29aadd28a4
All checks were successful
Publier l'image Docker / test (push) Successful in 30s
Publier l'image Docker / publish (push) Successful in 1m10s
feat: squelette serveur/client + Docker + CI de build/release
Pose l'infrastructure de base avant l'implémentation des fonctionnalités :
- server/ : Fastify + TypeScript (ESM), route /health, sert client/dist
- client/ : TypeScript vanilla + esbuild/sass, vue placeholder (shell)
- server/Dockerfile : image multi-étapes avec yt-dlp + ffmpeg embarqués
- .forgejo/workflows/publish-docker.yml : test puis publication sur le
  registre de conteneurs Forgejo (nécessite le secret REGISTRY_TOKEN)
- biome.json : lint du repo entier (downloader/ exclu)
- spec/architecture.md : documentation de ces choix

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 07:55:43 +02:00

15 lines
462 B
TypeScript

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' });
});
});