From 316a8b62d529a58787dfe9501e42955d3b393922 Mon Sep 17 00:00:00 2001 From: Anselme Date: Thu, 3 Oct 2024 16:47:25 +0200 Subject: [PATCH] fix test --- api/src/__tests__/inscription-goal.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/__tests__/inscription-goal.test.ts b/api/src/__tests__/inscription-goal.test.ts index f74280714b..364265b4d5 100644 --- a/api/src/__tests__/inscription-goal.test.ts +++ b/api/src/__tests__/inscription-goal.test.ts @@ -4,11 +4,15 @@ import { dbConnect, dbClose } from "./helpers/db"; import getNewInscriptionGoalFixture from "./fixtures/inscriptionGoal"; import { createInscriptionGoal } from "./helpers/inscriptionGoal"; import { FUNCTIONAL_ERRORS } from "snu-lib"; +import { InscriptionGoalModel } from "../models"; beforeAll(dbConnect); afterAll(dbClose); describe("Inscription Goal", () => { + beforeAll(async () => { + await InscriptionGoalModel.deleteMany({}); + }); describe("POST /inscription-goal/:cohort", () => { it("should post a new entry in inscription-goal", async () => { const res = await request(getAppHelper())