Files
basic-erp/apps/api/test/health.e2e-spec.ts
T

20 lines
521 B
TypeScript
Raw Normal View History

import type { INestApplication } from '@nestjs/common';
import request from 'supertest';
import { createTestApp } from './support/create-test-app.js';
describe('Health (e2e)', () => {
let app: INestApplication;
beforeAll(async () => {
app = await createTestApp([]);
});
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');
});
});