2021-10-29 20:57:24 -04:00
|
|
|
import { Test, TestingModule } from '@nestjs/testing';
|
|
|
|
import { INestApplication } from '@nestjs/common';
|
|
|
|
import * as request from 'supertest';
|
2022-01-14 15:20:24 -05:00
|
|
|
import { AppModule } from './../server/app.module';
|
2021-10-29 20:57:24 -04:00
|
|
|
|
|
|
|
describe('AppController (e2e)', () => {
|
|
|
|
let app: INestApplication;
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
const moduleFixture: TestingModule = await Test.createTestingModule({
|
|
|
|
imports: [AppModule],
|
|
|
|
}).compile();
|
|
|
|
|
|
|
|
app = moduleFixture.createNestApplication();
|
|
|
|
await app.init();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('/ (GET)', () => {
|
2022-01-14 15:20:24 -05:00
|
|
|
return request(app.getHttpServer()).get('/').expect(200).expect('Hello World!');
|
2021-10-29 20:57:24 -04:00
|
|
|
});
|
|
|
|
});
|