mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
chore(test/server): always initialize translations
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
import supertest from "supertest";
|
||||
import { initializeTranslations } from "../services/i18n.js";
|
||||
import type { Application } from "express";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
@@ -9,7 +8,6 @@ let app: Application;
|
||||
describe("Login Route test", () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
initializeTranslations();
|
||||
const buildApp = (await import("../app.js")).default;
|
||||
app = await buildApp();
|
||||
});
|
||||
|
||||
@@ -8,7 +8,6 @@ import BNote from "../../becca/entities/bnote.js";
|
||||
import TaskContext from "../task_context.js";
|
||||
import cls from "../cls.js";
|
||||
import sql_init from "../sql_init.js";
|
||||
import { initializeTranslations } from "../i18n.js";
|
||||
import single from "./single.js";
|
||||
import stripBom from "strip-bom";
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
@@ -53,7 +52,6 @@ describe("processNoteContent", () => {
|
||||
};
|
||||
});
|
||||
|
||||
initializeTranslations();
|
||||
sql_init.initializeDb();
|
||||
await sql_init.dbReady;
|
||||
});
|
||||
|
||||
@@ -9,7 +9,6 @@ import BNote from "../../becca/entities/bnote.js";
|
||||
import TaskContext from "../task_context.js";
|
||||
import cls from "../cls.js";
|
||||
import sql_init from "../sql_init.js";
|
||||
import { initializeTranslations } from "../i18n.js";
|
||||
import { trimIndentation } from "@triliumnext/commons";
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -45,7 +44,6 @@ describe("processNoteContent", () => {
|
||||
};
|
||||
});
|
||||
|
||||
initializeTranslations();
|
||||
sql_init.initializeDb();
|
||||
await sql_init.dbReady;
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import supertest from "supertest";
|
||||
import { initializeTranslations } from "../services/i18n.js";
|
||||
import type { Application, Request, Response, NextFunction } from "express";
|
||||
import { safeExtractMessageAndStackFromError } from "../services/utils.js";
|
||||
|
||||
@@ -10,7 +9,6 @@ describe("Share API test", () => {
|
||||
let cannotSetHeadersCount = 0;
|
||||
|
||||
beforeAll(async () => {
|
||||
initializeTranslations();
|
||||
const buildApp = (await import("../app.js")).default;
|
||||
app = await buildApp();
|
||||
app.use((err: unknown, req: Request, res: Response, next: NextFunction) => {
|
||||
|
||||
Reference in New Issue
Block a user