]> git.99rst.org Git - sgasser-llm-shield.git/commitdiff
Fix route test PII detector mock isolation (#85)
authorStefan Gasser <redacted>
Tue, 2 Jun 2026 15:11:34 +0000 (17:11 +0200)
committerGitHub <redacted>
Tue, 2 Jun 2026 15:11:34 +0000 (17:11 +0200)
src/routes/api.test.ts

index 2e0718752ffe9e3bf298db006506f86a456c5a2f..0b6cb83321881dbb870b129d1089a3972e48c56d 100644 (file)
@@ -9,6 +9,8 @@ const mockDetectPII = mock<(text: string, language: string) => Promise<PIIEntity
 mock.module("../pii/detect", () => ({
   getPIIDetector: () => ({
     detectPII: mockDetectPII,
+    healthCheck: mock(() => Promise.resolve(true)),
+    getLanguageValidation: mock(() => undefined),
   }),
   filterWhitelistedEntities,
 }));
git clone https://git.99rst.org/PROJECT