diff --git a/backend/__tests__/__integration__/dal/friends.spec.ts b/backend/__tests__/__integration__/dal/friends.spec.ts index c86b9dd0f..e306f636a 100644 --- a/backend/__tests__/__integration__/dal/friends.spec.ts +++ b/backend/__tests__/__integration__/dal/friends.spec.ts @@ -1,3 +1,12 @@ +import { + describe, + it, + expect, + vi, + beforeAll, + beforeEach, + afterEach, +} from "vitest"; import { ObjectId } from "mongodb"; import * as FriendsDal from "../../../src/dal/friends"; @@ -5,7 +14,7 @@ import { createUser, pb } from "../../__testData__/users"; describe("FriendsDal", () => { beforeAll(async () => { - FriendsDal.createIndicies(); + await FriendsDal.createIndicies(); }); describe("getRequests", () => { @@ -66,11 +75,11 @@ describe("FriendsDal", () => { describe("create", () => { const now = 1715082588; beforeEach(() => { - vitest.useFakeTimers(); - vitest.setSystemTime(now); + vi.useFakeTimers(); + vi.setSystemTime(now); }); afterEach(() => { - vitest.useRealTimers(); + vi.useRealTimers(); }); it("should fail creating duplicates", async () => { diff --git a/backend/__tests__/api/controllers/friends.spec.ts b/backend/__tests__/api/controllers/friends.spec.ts index 1edb2c71b..b3590fa4a 100644 --- a/backend/__tests__/api/controllers/friends.spec.ts +++ b/backend/__tests__/api/controllers/friends.spec.ts @@ -1,3 +1,4 @@ +import { describe, expect, it, vi, beforeEach } from "vitest"; import request, { Test as SuperTest } from "supertest"; import app from "../../../src/app"; import { mockBearerAuthentication } from "../../__testData__/auth";