27 lines
791 B
TypeScript
27 lines
791 B
TypeScript
import * as request from 'supertest';
|
|
import { INestApplication } from '@nestjs/common';
|
|
import { createApp } from './utils/testing-app';
|
|
// import { resetDb } from './utils/reset-db';
|
|
import { PrismaService } from 'src/prisma/prisma.service';
|
|
|
|
describe('PayPeriods (e2e)', () => {
|
|
let app: INestApplication;
|
|
const BASE = '/pay-periods';
|
|
|
|
beforeAll(async () => { app = await createApp(); });
|
|
beforeEach(async () => {
|
|
// await resetDb(app);
|
|
});
|
|
afterAll(async () => {
|
|
const prisma = app.get(PrismaService);
|
|
await app.close();
|
|
await prisma.$disconnect();
|
|
});
|
|
|
|
it(`GET ${BASE} → 200`, async () => {
|
|
const res = await request(app.getHttpServer()).get(BASE);
|
|
expect(res.status).toBe(200);
|
|
//ajouter ici GET /pay-periods/date/:date etc.
|
|
});
|
|
});
|