mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	chore(test/server): fix some mocks no longer working
This commit is contained in:
		| @@ -1,11 +1,9 @@ | ||||
| import { beforeAll } from "vitest"; | ||||
| import { getResourceDir } from "../src/services/utils.js"; | ||||
| import i18next from "i18next"; | ||||
| import { join } from "path"; | ||||
|  | ||||
| beforeAll(async () => { | ||||
|     // Initialize the translations manually to avoid any side effects. | ||||
|     const resourceDir = getResourceDir(); | ||||
|     const Backend = (await import("i18next-fs-backend")).default; | ||||
|  | ||||
|     // Initialize translations | ||||
| @@ -14,7 +12,7 @@ beforeAll(async () => { | ||||
|         fallbackLng: "en", | ||||
|         ns: "server", | ||||
|         backend: { | ||||
|             loadPath: join(resourceDir, "assets/translations/{{lng}}/{{ns}}.json") | ||||
|             loadPath: join(__dirname, "../src/assets/translations/{{lng}}/{{ns}}.json") | ||||
|         } | ||||
|     }); | ||||
| }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user