From 150a6109289161311b06cdb7579925d3a26ae66e Mon Sep 17 00:00:00 2001 From: Christian Fehmer Date: Mon, 15 Jan 2024 12:41:28 +0100 Subject: [PATCH] test: add test to remove accents in lazy mode (#4917) --- frontend/__tests__/test/lazy-mode.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/__tests__/test/lazy-mode.spec.ts b/frontend/__tests__/test/lazy-mode.spec.ts index 4c76b7d28..1609719c6 100644 --- a/frontend/__tests__/test/lazy-mode.spec.ts +++ b/frontend/__tests__/test/lazy-mode.spec.ts @@ -16,6 +16,10 @@ describe("lazy-mode", () => { const result = replaceAccents("Héllö", [["ö", "oe"]]); expect(result).toBe("Helloe"); }); + it("should remove accent if empty", () => { + const result = replaceAccents("خصوصًا", [["ٌ", ""]]); + expect(result).toBe("خصوصا"); + }); it("should ignore empty word", () => { const result = replaceAccents(""); expect(result).toBe("");