brief-20/backend/test/app.e2e-spec.ts

25 lines
540 B
TypeScript

import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { createTestApp } from './test-utils';
describe('AppController (e2e)', () => {
let app: INestApplication;
beforeAll(async () => {
app = await createTestApp();
});
afterAll(async () => {
await app.close();
});
describe('GET /api', () => {
it('should return "Hello World!"', () => {
return request(app.getHttpServer())
.get('/api')
.expect(200)
.expect('Hello World!');
});
});
});