* Fix to issue #425 * Fix to Fix error in previous fix, and adapt tests * Fix to Fix error in previous fix, and adapt tests plus prettier * Update tests/converters/libreoffice.test.ts Thanks Co-authored-by: Emrik Östling <emrik.ostling@gmail.com> * Update src/converters/libreoffice.ts Thanks Co-authored-by: Emrik Östling <emrik.ostling@gmail.com> * Update src/converters/libreoffice.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --------- Co-authored-by: Emrik Östling <emrik.ostling@gmail.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
8129ecdc39
commit
52af8d5824
2 changed files with 15 additions and 6 deletions
|
|
@ -63,7 +63,7 @@ test("invokes soffice with --headless and outdir derived from targetPath", async
|
|||
expect(cmd).toBe("soffice");
|
||||
expect(args).toEqual([
|
||||
"--headless",
|
||||
`--infilter="MS Word 2007 XML"`,
|
||||
"--infilter=MS Word 2007 XML",
|
||||
"--convert-to",
|
||||
"odt:writer8",
|
||||
"--outdir",
|
||||
|
|
@ -77,8 +77,15 @@ test("uses only outFilter when input has no filter (e.g., pdf -> txt)", async ()
|
|||
|
||||
const { args } = requireDefined(calls[0], "Expected at least one execFile call");
|
||||
|
||||
expect(args).not.toContainEqual(expect.stringMatching(/^--infilter=/));
|
||||
expect(args).toEqual(["--headless", "--convert-to", "txt", "--outdir", "out", "in.pdf"]);
|
||||
expect(args).toEqual([
|
||||
"--headless",
|
||||
"--infilter=writer_pdf_import",
|
||||
"--convert-to",
|
||||
"txt:Text",
|
||||
"--outdir",
|
||||
"out",
|
||||
"in.pdf",
|
||||
]);
|
||||
});
|
||||
|
||||
test("uses only infilter when convertTo has no out filter (e.g., docx -> pdf)", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue