health.spec.ts 365 B

12345678910111213
  1. import request from 'supertest';
  2. import { app } from '../src/app';
  3. describe('GET /api/health', () => {
  4. it('returns service status', async () => {
  5. const response = await request(app).get('/api/health');
  6. expect(response.status).toBe(200);
  7. expect(response.body.status).toBe('ok');
  8. expect(response.body.service).toBe('servicepilot-api');
  9. });
  10. });