From 87cc9f61a77e6f7f9390a6c7bea9028388ea0532 Mon Sep 17 00:00:00 2001 From: Edwin Hoogerbeets Date: Mon, 3 Feb 2025 11:50:35 -0800 Subject: [PATCH] Fixed 2 project tests - now that the recursive search for xliff files works again, the tests were accidentally finding all of the xliff files and therefore not producing the new strings files, which is what they trying to test! Solution is to point those tests at directories that do not contain the translations they were looking for, causing them to create the new strings files again --- packages/loctool/test/Project.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/loctool/test/Project.test.js b/packages/loctool/test/Project.test.js index ae2647290..152ed2509 100644 --- a/packages/loctool/test/Project.test.js +++ b/packages/loctool/test/Project.test.js @@ -134,7 +134,10 @@ describe("project", function() { expect(!fs.existsSync("./test/testfiles/loctest-new-es-US.xliff")).toBeTruthy(); expect(!fs.existsSync("./test/testfiles/loctest-new-ja-JP.xliff")).toBeTruthy(); expect(!fs.existsSync("./test/testfiles/loctest-new-zh-Hans-CN.xliff")).toBeTruthy(); - var project = ProjectFactory('./test/testfiles', {'locales': ['ja-JP']}); + var project = ProjectFactory('./test/testfiles', { + 'xliffsDir': "xliffs", + 'locales': ['ja-JP'] + }); project.addPath("md/test1.md"); project.init(function() { project.extract(function() { @@ -159,6 +162,7 @@ describe("project", function() { expect(!fs.existsSync("./test/testfiles/loctest-new-ja-JP.po")).toBeTruthy(); expect(!fs.existsSync("./test/testfiles/loctest-new-zh-Hans-CN.pot")).toBeTruthy(); var project = ProjectFactory('./test/testfiles', { + 'xliffsDir': "xliffs", 'locales': ['ja-JP'], 'intermediateFormat': 'po' });