Yield generated for cc5a24ab-ee32-496e-9c58-309ac9006a8d
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
654 B

import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';
describe('AppController (e2e)', () => {
let app: INestApplication;
beforeAll(async () => {
const moduleFixture = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});
it('/ping (GET)', () => {
return request(app.getHttpServer())
.get('/ping')
.expect(200)
.expect('pong');
});
afterAll(async () => {
await app.close();
});
});