40acf1a2 years ago24 lines · 630 B| 1 | import { Test, TestingModule } from '@nestjs/testing'; |
| 2 | import { INestApplication } |
| 3 | import * as request |
| 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 | }); |