test: dedupe managed image mock reads · openclaw/openclaw@3779c10
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -667,8 +667,9 @@ describe("createManagedOutgoingImageBlocks", () => {
|
667 | 667 | expect(blocks).toHaveLength(1); |
668 | 668 | expect(requireBlock(blocks).type).toBe("image"); |
669 | 669 | expect(onPrepareError).toHaveBeenCalledTimes(1); |
670 | | -expect(onPrepareError.mock.calls.at(0)?.[0]).toBeInstanceOf(Error); |
671 | | -expect(onPrepareError.mock.calls.at(0)?.[0]?.message).toMatch( |
| 670 | +const firstPrepareError = onPrepareError.mock.calls[0]?.[0]; |
| 671 | +expect(firstPrepareError).toBeInstanceOf(Error); |
| 672 | +expect(firstPrepareError?.message).toMatch( |
672 | 673 | /Managed image attachment .* could not be prepared/i, |
673 | 674 | ); |
674 | 675 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。