Skip to content

Commit 2537e26

Browse files
DrBaherclaude
andcommitted
test: skip --json success-telemetry test when LibreOffice unavailable
Same SKIP pattern as the smoke test above. The test pins `--backend libreoffice` which exits MISSING_DEP (3) on CI runners without LibreOffice installed (i.e. macOS — CI installs it only on Ubuntu). Pre-existing failure that landed when --json telemetry was added; fix lets macOS CI runs go green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 21721d3 commit 2537e26

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/cli-bin.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,16 @@ test("single-file mode with --json emits one success-shape line if conversion su
423423
}
424424
});
425425

426-
test("single-file --json success includes outputBytes and durationMs", () => {
426+
test("single-file --json success includes outputBytes and durationMs", (t) => {
427427
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "docx2pdf-cli-json-success-"));
428428
try {
429429
const fixture = path.join(__dirname, "fixtures", "sample.docx");
430430
const out = path.join(tempDir, "sample.pdf");
431431
const r = runCli(["--json", "--backend", "libreoffice", fixture, out]);
432+
if (r.status === EXIT.MISSING_DEP) {
433+
t.skip("LibreOffice not installed; CI installs it on Ubuntu");
434+
return;
435+
}
432436
assert.equal(r.status, 0, `stderr: ${r.stderr}`);
433437
const lines = r.stdout.trim().split("\n").filter(Boolean);
434438
assert.equal(lines.length, 1);

0 commit comments

Comments
 (0)