diff --git a/apps/server/src/routes/login.spec.ts b/apps/server/src/routes/login.spec.ts index 31abf725d..1c921168a 100644 --- a/apps/server/src/routes/login.spec.ts +++ b/apps/server/src/routes/login.spec.ts @@ -3,7 +3,6 @@ import supertest from "supertest"; import { initializeTranslations } from "../services/i18n.js"; import type { Application } from "express"; import dayjs from "dayjs"; -import buildApp from "../app.js"; let app: Application; @@ -11,6 +10,7 @@ describe("Login Route test", () => { beforeAll(async () => { initializeTranslations(); + const buildApp = (await import("../app.js")).default; app = await buildApp(); }); diff --git a/apps/server/src/services/migration.spec.ts b/apps/server/src/services/migration.spec.ts index 5a96cae7b..321d9418d 100644 --- a/apps/server/src/services/migration.spec.ts +++ b/apps/server/src/services/migration.spec.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from "vitest"; -import becca from "../becca/becca.js"; import sql from "./sql.js"; import migration from "./migration.js"; import cls from "./cls.js"; diff --git a/apps/server/src/share/routes.spec.ts b/apps/server/src/share/routes.spec.ts index de2f50fcc..8c8567f32 100644 --- a/apps/server/src/share/routes.spec.ts +++ b/apps/server/src/share/routes.spec.ts @@ -3,7 +3,6 @@ import supertest from "supertest"; import { initializeTranslations } from "../services/i18n.js"; import type { Application, Request, Response, NextFunction } from "express"; import { safeExtractMessageAndStackFromError } from "../services/utils.js"; -import buildApp from "../app.js"; let app: Application; @@ -12,6 +11,7 @@ describe("Share API test", () => { beforeAll(async () => { initializeTranslations(); + const buildApp = (await import("../app.js")).default; app = await buildApp(); app.use((err: unknown, req: Request, res: Response, next: NextFunction) => { const [ errMessage ] = safeExtractMessageAndStackFromError(err);