fix(vite): tests not runnable

This commit is contained in:
Elian Doran 2025-06-02 16:25:19 +03:00
parent d7c6c8f5fd
commit 1af20bdb73
No known key found for this signature in database

View File

@ -3,6 +3,11 @@ import i18next from "i18next";
import { join } from "path"; import { join } from "path";
import dayjs from "dayjs"; import dayjs from "dayjs";
// 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";
beforeAll(async () => { beforeAll(async () => {
// Initialize the translations manually to avoid any side effects. // Initialize the translations manually to avoid any side effects.
const Backend = (await import("i18next-fs-backend")).default; const Backend = (await import("i18next-fs-backend")).default;