test(routes/login): use beforeAll for now

This commit is contained in:
Panagiotis Papadopoulos 2025-04-16 10:06:12 +02:00
parent 55e2abc7de
commit 5462bdeef5

View File

@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it } from "vitest"; import { beforeAll, describe, expect, it } from "vitest";
import supertest from "supertest"; import supertest from "supertest";
import { initializeTranslations } from "../services/i18n.js"; import { initializeTranslations } from "../services/i18n.js";
import type { Application, Request, Response, NextFunction } from "express"; import type { Application, Request, Response, NextFunction } from "express";
@ -8,7 +8,7 @@ let app: Application;
describe("Login Route test", () => { describe("Login Route test", () => {
beforeEach(async () => { beforeAll(async () => {
initializeTranslations(); initializeTranslations();
app = (await import("../app.js")).default; app = (await import("../app.js")).default;
}); });