mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 02:55:16 +00:00
test: tighten browser download path assertion
This commit is contained in:
parent
2083d25e31
commit
ac18768c19
1 changed files with 1 additions and 1 deletions
|
|
@ -170,10 +170,10 @@ describe("pw-session ensurePageState", () => {
|
|||
expect(saveAsB.mock.calls[0]?.[0]).not.toBe(managedPathB);
|
||||
for (const call of [saveAsA.mock.calls[0], saveAsB.mock.calls[0]]) {
|
||||
const savedPath = call?.[0];
|
||||
expect(savedPath).toEqual(expect.any(String));
|
||||
if (typeof savedPath !== "string") {
|
||||
throw new Error("Expected saved download path");
|
||||
}
|
||||
expect(savedPath.length).toBeGreaterThan(0);
|
||||
const savedParentName = path.basename(path.dirname(savedPath));
|
||||
expect(
|
||||
savedParentName.includes("fs-safe-output") ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue