mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 09:56:36 +01:00 
			
		
		
		
	fix(test): url import not found
This commit is contained in:
		| @@ -1,9 +1,6 @@ | ||||
| import { LOCALES } from "@triliumnext/commons"; | ||||
| import { readFileSync } from "fs"; | ||||
| import { join, dirname } from "path"; | ||||
| import { fileURLToPath } from "url"; | ||||
|  | ||||
| const scriptDir = dirname(fileURLToPath(import.meta.url)); | ||||
| import { join } from "path"; | ||||
|  | ||||
| describe("i18n", () => { | ||||
|     it("translations are valid JSON", () => { | ||||
| @@ -12,7 +9,7 @@ describe("i18n", () => { | ||||
|                 continue; | ||||
|             } | ||||
|  | ||||
|             const translationPath = join(scriptDir, "..", "translations", locale.id, "translation.json"); | ||||
|             const translationPath = join(__dirname, "..", "translations", locale.id, "translation.json"); | ||||
|             const translationFile = readFileSync(translationPath, { encoding: "utf-8" }); | ||||
|             expect(() => JSON.parse(translationFile), `JSON error while parsing locale '${locale.id}' at "${translationPath}"`) | ||||
|                 .not.toThrow(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user