t2-stat-parser/app/api/test/app.e2e-spec.ts

22 lines
588 B
TypeScript
Raw Normal View History

2020-08-22 10:19:50 -04:00
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';
describe('AppController (e2e)', () => {
2020-08-29 19:20:44 -04:00
let app: INestApplication;
2020-08-22 10:19:50 -04:00
2020-08-29 19:20:44 -04:00
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [ AppModule ]
}).compile();
2020-08-22 10:19:50 -04:00
2020-08-29 19:20:44 -04:00
app = moduleFixture.createNestApplication();
await app.init();
});
2020-08-22 10:19:50 -04:00
2020-08-29 19:20:44 -04:00
it('/ (GET)', () => {
return request(app.getHttpServer()).get('/').expect(200).expect('Healthy!');
});
2020-08-22 10:19:50 -04:00
});