@dxdeveloperexperience/hygie
Version:
Hygie is an easy-to-use Open-Source REST API allowing you to interact with GIT events. This NestJS API expose a set of customizable rules to automate your project's life cycle.
46 lines (37 loc) • 1.04 kB
text/typescript
import * as request from 'supertest';
import { Test } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import { MockAppModule } from '../__mocks__/mock.app.module';
describe('/doc (e2e)', () => {
let app: INestApplication;
beforeAll(async () => {
const moduleFixture = await Test.createTestingModule({
imports: [MockAppModule],
}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});
it('/doc/options (GET)', () => {
return request(app.getHttpServer())
.get('/doc/options')
.expect(200);
});
it('/doc/runnables (GET)', () => {
return request(app.getHttpServer())
.get('/doc/runnables')
.expect(200);
});
it('/doc/rules (GET)', () => {
return request(app.getHttpServer())
.get('/doc/rules')
.expect(200);
});
it('/doc/schema (GET)', () => {
return request(app.getHttpServer())
.get('/doc/schema')
.expect(200);
});
afterAll(async () => {
await app.close();
});
});