2020-01-25 22:19:14 +01:00
|
|
|
import { Test, TestingModule } from "@nestjs/testing";
|
|
|
|
|
import { INestApplication } from "@nestjs/common";
|
|
|
|
|
import * as request from "supertest";
|
|
|
|
|
import { AppModule } from "../src/app.module";
|
|
|
|
|
|
|
|
|
|
describe("AppController (e2e)", () => {
|
|
|
|
|
let app: INestApplication;
|
|
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
|
const moduleFixture: TestingModule = await Test.createTestingModule({
|
2021-05-25 18:12:42 +02:00
|
|
|
imports: [AppModule],
|
2020-01-25 22:19:14 +01:00
|
|
|
}).compile();
|
|
|
|
|
|
|
|
|
|
app = moduleFixture.createNestApplication();
|
|
|
|
|
await app.init();
|
|
|
|
|
});
|
|
|
|
|
|
2021-06-20 00:49:17 +02:00
|
|
|
it("/ (GET)", () =>
|
|
|
|
|
request(app.getHttpServer()).get("/").expect(200).expect("Hello World!"));
|
2020-01-25 22:19:14 +01:00
|
|
|
});
|