| 1 | import { Test, TestingModule } from '@nestjs/testing'; |
| 2 | import { INestApplication } |
| 3 | import request from 'supertest |
| 4 | import { AppModule } |
| 5 | |
| 6 | describe('AppController (e2e)', () |
| 7 | let app: |
| 8 | |
| 9 | beforeEach(async () |
| 10 | const moduleFixture: |
| 11 | imports: [AppModule], |
| 12 | }).compile(); |
| 13 | |
| 14 | app = moduleFixture. |
| 15 | await app.init |
| 16 | }); |
| 17 | |
| 18 | it('/ (GET)', |
| 19 | return request(app |
| 20 | .get('/') |
| 21 | .expect(200) |
| 22 | .expect('Hello World!') |
| 23 | }); |
| 24 | |
| 25 | afterEach(async () |
| 26 | await app.close |
| 27 | }); |
| 28 | }); |