test: tighten twitch client send assertion · openclaw/openclaw@eb81dd8
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -339,11 +339,10 @@ describe("TwitchClientManager", () => {
|
339 | 339 | |
340 | 340 | it("should send message successfully", async () => { |
341 | 341 | const result = await manager.sendMessage(testAccount, "testchannel", "Hello, world!"); |
| 342 | +const { messageId, ...resultRest } = result; |
342 | 343 | |
343 | | -expect(result).toMatchObject({ ok: true }); |
344 | | -expect(result.messageId).toMatch( |
345 | | -/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, |
346 | | -); |
| 344 | +expect(resultRest).toEqual({ ok: true }); |
| 345 | +expect(messageId).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i); |
347 | 346 | expect(mockSay).toHaveBeenCalledWith("testchannel", "Hello, world!"); |
348 | 347 | }); |
349 | 348 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。