test(browser): fix windows download tmp path assertions

This commit is contained in:
Peter Steinberger 2026-03-02 01:32:21 +00:00
parent 68a8a98ab7
commit 949200d7cb
1 changed files with 3 additions and 6 deletions

View File

@ -200,11 +200,8 @@ describe("pw-tools-core", () => {
suggestedFilename: "file.bin",
});
expect(typeof outPath).toBe("string");
const expectedRootedDownloadsDir = path.join(
path.sep,
"tmp",
"openclaw-preferred",
"downloads",
const expectedRootedDownloadsDir = path.resolve(
path.join(path.sep, "tmp", "openclaw-preferred", "downloads"),
);
const expectedDownloadsTail = `${path.join("tmp", "openclaw-preferred", "downloads")}${path.sep}`;
expect(path.dirname(String(outPath))).toBe(expectedRootedDownloadsDir);
@ -221,7 +218,7 @@ describe("pw-tools-core", () => {
});
expect(typeof outPath).toBe("string");
expect(path.dirname(String(outPath))).toBe(
path.join(path.sep, "tmp", "openclaw-preferred", "downloads"),
path.resolve(path.join(path.sep, "tmp", "openclaw-preferred", "downloads")),
);
expect(path.basename(String(outPath))).toMatch(/-passwd$/);
expect(path.normalize(res.path)).toContain(