From 5fd17e320d31c811770aba617f9d81f711950b09 Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Wed, 15 May 2024 16:21:51 +0330 Subject: [PATCH] Make the test compatible with develop --- src/test/getProject.test.ts | 8 ++++---- src/test/store.test.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/getProject.test.ts b/src/test/getProject.test.ts index 81b5a8b..0c617b7 100644 --- a/src/test/getProject.test.ts +++ b/src/test/getProject.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test, afterAll } from "@jest/globals"; -import { closeConnection, getCtx, getEntityManager } from "./utils"; +import { closeConnection, getTestCtx, getTestEntityManager } from "./utils"; import { getProject } from "../controllers/utils/modelHelper"; import { Project } from "../model"; @@ -9,12 +9,12 @@ describe("get project", () => { }); beforeEach(async () => { - const em = await getEntityManager(); + const em = await getTestEntityManager(); await em.delete(Project, {}); }); test("handles non-existent projects", async () => { - const ctx = await getCtx(); + const ctx = await getTestCtx(); const id = "giveth-1"; const project = await getProject(ctx, "giveth", "1"); expect(project).toBeDefined(); @@ -22,7 +22,7 @@ describe("get project", () => { }); test("fetches an existing project", async () => { - const ctx = await getCtx(); + const ctx = await getTestCtx(); const id = "giveth-1"; // create a project manually await getProject(ctx, "giveth", "1"); diff --git a/src/test/store.test.ts b/src/test/store.test.ts index 1c1d2aa..4d4ac09 100644 --- a/src/test/store.test.ts +++ b/src/test/store.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test, afterAll } from "@jest/globals"; import { closeConnection, getTestCtx } from "./utils"; import { Organisation } from "../model"; -describe.skip("simple storage", () => { +describe("simple storage", () => { afterAll(async () => { await closeConnection(); });