fix(web): check sanitized segment instead of full path in Windows test
This commit is contained in:
parent
8090328146
commit
641c64b37d
@ -24,8 +24,11 @@ describe("resolveWhatsAppAuthDir", () => {
|
|||||||
cfg: stubCfg,
|
cfg: stubCfg,
|
||||||
accountId: "foo/bar\\baz",
|
accountId: "foo/bar\\baz",
|
||||||
});
|
});
|
||||||
expect(authDir).not.toContain("foo/bar");
|
// Sprawdzaj sanityzacje na segmencie accountId, nie na calej sciezce
|
||||||
expect(authDir).not.toContain("\\");
|
// (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", () => {
|
it("returns default directory for empty accountId", () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user