| 1 | import { Test, TestingModule } from '@nestjs/testing'; |
| 2 | import { INestApplication } from '@nestjs/common'; |
| 3 | import * as request from 'supertest'; |
| 4 | import { EventsServiceModule } from './../src/events-service.module'; |
| 5 | |
| 6 | describe('EventsServiceController (e2e)', () => { |
| 7 | let app: INestApplication; |
| 8 | |
| 9 | beforeEach(async () => { |
| 10 | const moduleFixture: TestingModule = await Test.createTestingModule({ |
| 11 | imports: [EventsServiceModule], |
| 12 | }).compile(); |
| 13 | |
| 14 | app = moduleFixture.createNestApplication(); |
| 15 | await app.init(); |
| 16 | }); |
| 17 | |
| 18 | it('/ (GET)', () => { |
| 19 | return request(app.getHttpServer()) |
| 20 | .get('/') |
| 21 | .expect(200) |
| 22 | .expect('Hello World!'); |
| 23 | }); |
| 24 | }); |