fix(web): check sanitized segment instead of full path in Windows test

This commit is contained in:
Leszek Szpunar 2026-01-30 15:54:38 +01:00
parent 8090328146
commit 641c64b37d

View File

@ -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", () => {