2026-10-13 18:13:49 -05:00
|
|
|
import type { INestApplication } from '@nestjs/common';
|
|
|
|
|
import request from 'supertest';
|
2026-10-13 18:47:51 -05:00
|
|
|
import { createTestApp } from './support/create-test-app.js';
|
2026-10-13 18:13:49 -05:00
|
|
|
|
|
|
|
|
describe('Health (e2e)', () => {
|
|
|
|
|
let app: INestApplication;
|
|
|
|
|
|
|
|
|
|
beforeAll(async () => {
|
2026-10-13 18:47:51 -05:00
|
|
|
app = await createTestApp([]);
|
2026-10-13 18:13:49 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
afterAll(async () => {
|
|
|
|
|
await app.close();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('GET /api/health responde ok', async () => {
|
|
|
|
|
const res = await request(app.getHttpServer()).get('/api/health').expect(200);
|
|
|
|
|
expect(res.body.status).toBe('ok');
|
|
|
|
|
});
|
|
|
|
|
});
|