From 80f4243cda684250fd43f4a9a2ebfd36440af1d6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 12 Mar 2025 12:57:12 +0100 Subject: [PATCH] Update validate-json.test.ts --- frontend/src/__tests__/public/validate-json.test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/__tests__/public/validate-json.test.ts b/frontend/src/__tests__/public/validate-json.test.ts index 96e0bfa..60f34ba 100644 --- a/frontend/src/__tests__/public/validate-json.test.ts +++ b/frontend/src/__tests__/public/validate-json.test.ts @@ -11,13 +11,18 @@ const encoding = "utf-8"; let fileNames: string[] = []; try { - // Prüfen, ob das Verzeichnis existiert, falls nicht, Tests überspringen fileNames = (await fs.readdir(jsonDir)).filter((fileName) => fileName !== metadataFileName); } catch (error) { console.warn(`Skipping JSON validation tests: ${error.message}`); } -if (fileNames.length > 0) { +if (fileNames.length === 0) { + describe("Dummy Test Suite", () => { + it("Skipping JSON tests because no files were found", () => { + assert(true); + }); + }); +} else { describe.each(fileNames)("%s", async (fileName) => { let script: Script; @@ -61,6 +66,4 @@ if (fileNames.length > 0) { }); }); }); -} else { - console.warn("Skipping tests because no JSON files were found."); }