test: tighten qa channel media path assertion · openclaw/openclaw@8e2c594
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/qa-channel/src
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import path from "node:path"; |
1 | 2 | import { verifyChannelMessageAdapterCapabilityProofs } from "openclaw/plugin-sdk/channel-message"; |
2 | 3 | import { |
3 | 4 | createPluginRuntimeMock, |
@@ -410,7 +411,9 @@ describe("qa-channel plugin", () => {
|
410 | 411 | MediaTypes?: string[]; |
411 | 412 | }; |
412 | 413 | expect(typeof mediaCtx.MediaPath).toBe("string"); |
413 | | -expect(mediaCtx.MediaPath).toContain("red-top-blue-bottom"); |
| 414 | +expect(path.basename(mediaCtx.MediaPath ?? "")).toMatch( |
| 415 | +/^red-top-blue-bottom---[a-f0-9-]{36}\.png$/, |
| 416 | +); |
414 | 417 | expect(mediaCtx.MediaType).toBe("image/png"); |
415 | 418 | expect(mediaCtx.MediaPaths).toEqual([mediaCtx.MediaPath]); |
416 | 419 | expect(mediaCtx.MediaTypes).toEqual(["image/png"]); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。