2022-02-20 11:51:55 +00:00
|
|
|
import { INestApplication } from '@nestjs/common';
|
2022-05-16 09:23:59 +00:00
|
|
|
import { Test, TestingModule } from '@nestjs/testing';
|
2023-04-09 05:24:34 +00:00
|
|
|
|
2022-02-20 11:51:55 +00:00
|
|
|
import * as request from 'supertest';
|
2022-05-16 09:23:59 +00:00
|
|
|
|
2022-02-20 11:51:55 +00:00
|
|
|
import { AppModule } from './../src/app.module';
|
|
|
|
|
|
|
|
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-03-12 03:27:56 +00:00
|
|
|
return request(app.getHttpServer()).get('/').expect(200).expect('Hello World!');
|
2022-02-20 11:51:55 +00:00
|
|
|
});
|
|
|
|
});
|