mirror of
https://github.com/zadam/trilium.git
synced 2026-02-26 16:43:36 +01:00
Some checks are pending
Checks / main (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Deploy Documentation / Build and Deploy Documentation (push) Waiting to run
Dev / Test development (push) Waiting to run
Dev / Build Docker image (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile) (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile.alpine) (push) Blocked by required conditions
/ Check Docker build (Dockerfile) (push) Waiting to run
/ Check Docker build (Dockerfile.alpine) (push) Waiting to run
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.alpine, ubuntu-latest, linux/amd64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v7) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v8) (push) Blocked by required conditions
/ Merge manifest lists (push) Blocked by required conditions
playwright / E2E tests on linux-arm64 (push) Waiting to run
playwright / E2E tests on linux-x64 (push) Waiting to run
Deploy website / Build & deploy website (push) Waiting to run
Signed-off-by: Elian Doran <contact@eliandoran.me>
31 lines
968 B
TypeScript
31 lines
968 B
TypeScript
import { beforeAll } from "vitest";
|
|
import i18next from "i18next";
|
|
import { join } from "path";
|
|
import { setDayjsLocale } from "@triliumnext/commons";
|
|
|
|
// Initialize environment variables.
|
|
process.env.TRILIUM_DATA_DIR = join(__dirname, "db");
|
|
process.env.TRILIUM_RESOURCE_DIR = join(__dirname, "../src");
|
|
process.env.TRILIUM_INTEGRATION_TEST = "memory";
|
|
process.env.TRILIUM_ENV = "dev";
|
|
process.env.TRILIUM_PUBLIC_SERVER = "http://localhost:4200";
|
|
|
|
beforeAll(async () => {
|
|
// Initialize the translations manually to avoid any side effects.
|
|
const Backend = (await import("i18next-fs-backend")).default;
|
|
|
|
// Initialize translations
|
|
await i18next.use(Backend).init({
|
|
lng: "en",
|
|
fallbackLng: "en",
|
|
ns: "server",
|
|
backend: {
|
|
loadPath: join(__dirname, "../src/assets/translations/{{lng}}/{{ns}}.json")
|
|
},
|
|
showSupportNotice: false
|
|
});
|
|
|
|
// Initialize dayjs
|
|
await setDayjsLocale("en");
|
|
});
|