Skip to content

Commit 647e18a

Browse files
authored
test: deflake agent image root checks (#87499)
1 parent 771ddcf commit 647e18a

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/agents/tools/image-tool.test.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -648,12 +648,14 @@ function installFastLocalImageProviderStubs(...providers: MediaUnderstandingProv
648648
fileName: path.basename(mediaUrl),
649649
};
650650
},
651-
optimizeImageBufferForWebMedia: async ({ buffer, contentType, fileName }) => ({
652-
buffer,
653-
contentType: contentType ?? "image/png",
654-
kind: "image",
655-
fileName,
656-
}),
651+
optimizeImageBufferForWebMedia: async ({ buffer, contentType, fileName }) => {
652+
return {
653+
buffer,
654+
contentType: contentType ?? "image/png",
655+
kind: "image",
656+
fileName,
657+
};
658+
},
657659
}),
658660
});
659661
}
@@ -1793,7 +1795,7 @@ describe("image tool implicit imageModel config", () => {
17931795
await fs.rm(attachmentRoot, { recursive: true, force: true });
17941796
}
17951797
});
1796-
}, 240_000);
1798+
});
17971799

17981800
it("allows image paths from current iMessage wildcard attachment roots", async () => {
17991801
await withTempAgentDir(async (agentDir) => {
@@ -1852,7 +1854,7 @@ describe("image tool implicit imageModel config", () => {
18521854
await fs.rm(attachmentRootParent, { recursive: true, force: true });
18531855
}
18541856
});
1855-
}, 240_000);
1857+
});
18561858

18571859
it("allows workspace images via createOpenClawCodingTools when workspace root is explicit", async () => {
18581860
await withTempWorkspacePng(async ({ workspaceDir, imagePath }) => {

0 commit comments

Comments
 (0)