agenthub/test/healthz.test.ts
Paperclip FoundingEngineer bdd5d92ba7 Initial AgentHub codebase for Coolify deployment
Complete implementation ready for Coolify:
- Node.js 22 + Fastify + socket.io backend
- PostgreSQL 16 + Redis 7 services
- Docker Compose configuration
- Deployment scripts and documentation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-01 21:25:57 +00:00

19 lines
671 B
TypeScript

import { describe, expect, it } from 'vitest';
import { buildApp } from '../src/app.js';
import { loadConfig } from '../src/config.js';
describe('GET /healthz', () => {
it('returns 200 with status ok', async () => {
const config = loadConfig({ NODE_ENV: 'test', LOG_LEVEL: 'fatal' });
const app = await buildApp({ config });
try {
const res = await app.inject({ method: 'GET', url: '/healthz' });
expect(res.statusCode).toBe(200);
const body = res.json() as { status: string; uptime: number };
expect(body.status).toBe('ok');
expect(typeof body.uptime).toBe('number');
} finally {
await app.close();
}
});
});