Skip to content

Commit

Permalink
Add test for xliff 2.0 parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
wadimw committed Sep 26, 2024
1 parent 7daff98 commit 446aa20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/loctool/__tests__/PendoXliffFile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ describe("PendoXliffFile", () => {
expect(() => file.extract()).toThrow();
});

it("should throw when given xliff version 2.0", () => {
const xliff = `<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="fr"><file id="f1"></file></xliff>`;
mockedFs.readFileSync.mockReturnValue(xliff);
expect(() => file.extract()).toThrow();
});

it("should extract a valid xliff file", () => {
const xliff = makeXliff({
datatype: "x-undefined",
Expand Down

0 comments on commit 446aa20

Please sign in to comment.