mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 21:30:42 +00:00
test: tighten qa channel media context assertion
This commit is contained in:
@@ -382,17 +382,13 @@ describe("qa-channel plugin", () => {
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
|
||||
expect(dispatchedCtx).not.toBeNull();
|
||||
if (!dispatchedCtx) {
|
||||
throw new Error("expected dispatched context");
|
||||
}
|
||||
const mediaCtx: {
|
||||
MediaPath?: string;
|
||||
MediaPaths?: string[];
|
||||
MediaType?: string;
|
||||
MediaTypes?: string[];
|
||||
} = dispatchedCtx;
|
||||
expect(mediaCtx.MediaPath).toEqual(expect.stringContaining("red-top-blue-bottom"));
|
||||
} | null = dispatchedCtx;
|
||||
expect(mediaCtx?.MediaPath).toEqual(expect.stringContaining("red-top-blue-bottom"));
|
||||
expect(mediaCtx.MediaType).toBe("image/png");
|
||||
expect(mediaCtx.MediaPaths).toEqual([mediaCtx.MediaPath]);
|
||||
expect(mediaCtx.MediaTypes).toEqual(["image/png"]);
|
||||
|
||||
Reference in New Issue
Block a user