test: tighten line reply fallback assertion · openclaw/openclaw@ef21458
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -144,7 +144,8 @@ describe("sendLineReplyChunks", () => {
|
144 | 144 | createTextMessageWithQuickReplies, |
145 | 145 | } = createReplyChunksHarness(); |
146 | 146 | const onReplyError = vi.fn(); |
147 | | -replyMessageLine.mockRejectedValueOnce(new Error("reply failed")); |
| 147 | +const replyError = new Error("reply failed"); |
| 148 | +replyMessageLine.mockRejectedValueOnce(replyError); |
148 | 149 | |
149 | 150 | const result = await sendLineReplyChunks({ |
150 | 151 | to: "line:group:1", |
@@ -162,7 +163,7 @@ describe("sendLineReplyChunks", () => {
|
162 | 163 | }); |
163 | 164 | |
164 | 165 | expect(result.replyTokenUsed).toBe(true); |
165 | | -expect(onReplyError).toHaveBeenCalledWith(expect.any(Error)); |
| 166 | +expect(onReplyError).toHaveBeenCalledWith(replyError); |
166 | 167 | expect(pushMessageLine).toHaveBeenNthCalledWith(1, "line:group:1", "1", { |
167 | 168 | cfg: LINE_TEST_CFG, |
168 | 169 | accountId: "default", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。