mirror of
https://github.com/FJurmanovic/sugarr.git
synced 2026-11-11 15:51:09 +00:00
16 lines
660 B
TypeScript
16 lines
660 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import Fastify from 'fastify';
|
|
import { HealthController } from '../../../src/app/controllers/HealthController';
|
|
import type { AppConfig } from '../../../src/app/config/AppConfig';
|
|
|
|
describe('HealthController', () => {
|
|
it('reports status ok with llm/radarr flags from config', async () => {
|
|
const app = Fastify();
|
|
new HealthController({ LLM_ENABLED: true, RADARR_ENABLED: false } as AppConfig).register(app);
|
|
|
|
const res = await app.inject({ method: 'GET', url: '/health' });
|
|
expect(res.statusCode).toBe(200);
|
|
expect(res.json()).toEqual({ status: 'ok', llm: true, radarr: false });
|
|
});
|
|
});
|