Skip to content

Commit

Permalink
Fixed 2 project tests
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
ehoogerbeets committed Feb 3, 2025
1 parent 9818185 commit 87cc9f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/loctool/test/Project.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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'
});
Expand Down

0 comments on commit 87cc9f6

Please sign in to comment.