From 641c64b37d0aaf95d7c74f3c1e61060ed246e9b0 Mon Sep 17 00:00:00 2001 From: Leszek Szpunar <13106764+leszekszpunar@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:54:38 +0100 Subject: [PATCH] fix(web): check sanitized segment instead of full path in Windows test --- src/web/accounts.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/web/accounts.test.ts b/src/web/accounts.test.ts index 98d5031ac..c077b8470 100644 --- a/src/web/accounts.test.ts +++ b/src/web/accounts.test.ts @@ -24,8 +24,11 @@ describe("resolveWhatsAppAuthDir", () => { cfg: stubCfg, accountId: "foo/bar\\baz", }); - expect(authDir).not.toContain("foo/bar"); - expect(authDir).not.toContain("\\"); + // Sprawdzaj sanityzacje na segmencie accountId, nie na calej sciezce + // (Windows uzywa backslash jako separator katalogow). + const segment = path.basename(authDir); + expect(segment).not.toContain("/"); + expect(segment).not.toContain("\\"); }); it("returns default directory for empty accountId", () => {