Setup Swagger

This commit is contained in:
Anthony Mineo 2020-08-29 19:20:44 -04:00
parent a1b2f2cd78
commit 2c3c9a0532
9 changed files with 37 additions and 53 deletions

View file

@ -4,21 +4,18 @@ import * as request from 'supertest';
import { AppModule } from './../src/app.module';
describe('AppController (e2e)', () => {
let app: INestApplication;
let app: INestApplication;
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule],
}).compile();
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [ AppModule ]
}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});
app = moduleFixture.createNestApplication();
await app.init();
});
it('/ (GET)', () => {
return request(app.getHttpServer())
.get('/')
.expect(200)
.expect('Hello World!');
});
it('/ (GET)', () => {
return request(app.getHttpServer()).get('/').expect(200).expect('Healthy!');
});
});