mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 19:15:47 +00:00
test: tighten qa channel media path assertion
This commit is contained in:
parent
d77e891696
commit
8e2c594f77
1 changed files with 4 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import path from "node:path";
|
||||
import { verifyChannelMessageAdapterCapabilityProofs } from "openclaw/plugin-sdk/channel-message";
|
||||
import {
|
||||
createPluginRuntimeMock,
|
||||
|
|
@ -410,7 +411,9 @@ describe("qa-channel plugin", () => {
|
|||
MediaTypes?: string[];
|
||||
};
|
||||
expect(typeof mediaCtx.MediaPath).toBe("string");
|
||||
expect(mediaCtx.MediaPath).toContain("red-top-blue-bottom");
|
||||
expect(path.basename(mediaCtx.MediaPath ?? "")).toMatch(
|
||||
/^red-top-blue-bottom---[a-f0-9-]{36}\.png$/,
|
||||
);
|
||||
expect(mediaCtx.MediaType).toBe("image/png");
|
||||
expect(mediaCtx.MediaPaths).toEqual([mediaCtx.MediaPath]);
|
||||
expect(mediaCtx.MediaTypes).toEqual(["image/png"]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue