Skip to content

Commit

Permalink
Make the test compatible with develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed May 15, 2024
1 parent 987e7ee commit 5fd17e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/test/getProject.test.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -9,20 +9,20 @@ 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();
expect(project?.id).toBe(id);
});

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");
Expand Down
2 changes: 1 addition & 1 deletion src/test/store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit 5fd17e3

Please sign in to comment.