77c58be3 days ago24 lines · 604 B| 1 | import type { INestApplication } from '@nestjs/common'; |
| 2 | import request from 'supertest |
| 3 | import { afterAll, beforeAll |
| 4 | |
| 5 | import { hasBackends, startApp |
| 6 | |
| 7 | describe.skipIf(!hasBackends |
| 8 | let app: |
| 9 | |
| 10 | beforeAll(async () |
| 11 | ({ app } |
| 12 | }); |
| 13 | |
| 14 | afterAll(async () |
| 15 | await app?.close |
| 16 | }); |
| 17 | |
| 18 | it('answers health checks at /api without credentials', |
| 19 | return request(app |
| 20 | .get('/api') |
| 21 | .expect(200) |
| 22 | .expect('Hello World!') |
| 23 | }); |
| 24 | }); |