From ecfa591eecbb47112fba69ad95aaf168f35cc52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Krzeslak?= Date: Tue, 4 Aug 2026 02:02:20 +0200 Subject: [PATCH] test: test that handleConvert does not throw --- tests/converters/main.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/converters/main.test.ts b/tests/converters/main.test.ts index b0b5e1d..eb4da56 100644 --- a/tests/converters/main.test.ts +++ b/tests/converters/main.test.ts @@ -107,7 +107,7 @@ END:VCARD await rm(outPath); }); -test("handleConvert with unsupported format returns error in DB", async () => { +test("handleConvert with unsupported format does not throw", async () => { const uploadsDir = "./data/uploads/test-unsupported/"; const outputDir = "./data/output/test-unsupported/"; await mkdir(uploadsDir, { recursive: true }); @@ -121,7 +121,9 @@ test("handleConvert with unsupported format returns error in DB", async () => { // Try to convert unsupported format const jobId = createMockJobId("unsupported-test"); // This should not throw, just log that no converter is available - await handleConvert([fileName], uploadsDir, outputDir, "pdf", "xyz123", jobId); + expect( + handleConvert([fileName], uploadsDir, outputDir, "pdf", "xyz123", jobId), + ).resolves.toBeUndefined(); await rm(inputPath); });