chzzk-server/test/app.e2e-spec.ts

20 lines
465 B
TypeScript

import { Test } from '@nestjs/testing';
import request from 'supertest';
import { AppModule } from '../src/app.module';
describe('App (e2e)', () => {
it('/health (GET)', async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
const app = moduleRef.createNestApplication();
await app.init();
await request(app.getHttpServer()).get('/health').expect(200);
await app.close();
});
});