mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Project Initialization
This commit is contained in:
26
apps/edr-freight-api/test/app.e2e-spec.ts
Normal file
26
apps/edr-freight-api/test/app.e2e-spec.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user