mirror of
https://fastgit.cc/github.com/openclaw/openclaw
synced 2026-05-01 15:11:28 +08:00
test: accept media loader option expansion
This commit is contained in:
@@ -334,10 +334,13 @@ describe("sendMessageMatrix media", () => {
|
||||
});
|
||||
|
||||
expect(loadConfigMock).not.toHaveBeenCalled();
|
||||
expect(loadWebMediaMock).toHaveBeenCalledWith("file:///tmp/photo.png", {
|
||||
maxBytes: 1024 * 1024,
|
||||
localRoots: undefined,
|
||||
});
|
||||
expect(loadWebMediaMock).toHaveBeenCalledWith(
|
||||
"file:///tmp/photo.png",
|
||||
expect.objectContaining({
|
||||
maxBytes: 1024 * 1024,
|
||||
localRoots: undefined,
|
||||
}),
|
||||
);
|
||||
expect(resolveTextChunkLimitMock).toHaveBeenCalledWith(explicitCfg, "matrix", "ops");
|
||||
});
|
||||
|
||||
@@ -350,10 +353,13 @@ describe("sendMessageMatrix media", () => {
|
||||
mediaLocalRoots: ["/tmp/openclaw-matrix-test"],
|
||||
});
|
||||
|
||||
expect(loadWebMediaMock).toHaveBeenCalledWith("file:///tmp/photo.png", {
|
||||
maxBytes: undefined,
|
||||
localRoots: ["/tmp/openclaw-matrix-test"],
|
||||
});
|
||||
expect(loadWebMediaMock).toHaveBeenCalledWith(
|
||||
"file:///tmp/photo.png",
|
||||
expect.objectContaining({
|
||||
maxBytes: undefined,
|
||||
localRoots: ["/tmp/openclaw-matrix-test"],
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -214,10 +214,13 @@ describe("web outbound", () => {
|
||||
mediaLocalRoots: ["/tmp/workspace"],
|
||||
});
|
||||
|
||||
expect(loadWebMediaMock).toHaveBeenCalledWith("/tmp/pic.jpg", {
|
||||
maxBytes: 100 * 1024 * 1024,
|
||||
localRoots: ["/tmp/workspace"],
|
||||
});
|
||||
expect(loadWebMediaMock).toHaveBeenCalledWith(
|
||||
"/tmp/pic.jpg",
|
||||
expect.objectContaining({
|
||||
maxBytes: 100 * 1024 * 1024,
|
||||
localRoots: ["/tmp/workspace"],
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("sends polls via active listener", async () => {
|
||||
|
||||
Reference in New Issue
Block a user