Files
edr-platform/apps/edr-freight-api/test/app.e2e-spec.ts
Michael Abebe 1c5ee19388 chore: fmt
2026-05-12 16:50:18 +03:00

27 lines
680 B
TypeScript

import { INestApplication } from "@nestjs/common";
import { Test, TestingModule } from "@nestjs/testing";
import request from "supertest";
import { AppModule } from "../src/app.module";
describe("Freight API (e2e)", () => {
let app: INestApplication;
beforeAll(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});
afterAll(async () => {
await app.close();
});
it("GET /api/bookings returns a 200 with a list", () => {
return request(app.getHttpServer()).get("/api/bookings").expect(200);
});
});