test: tighten whatsapp inbound context assertions · openclaw/openclaw@5a9647d
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/whatsapp/src/auto-reply/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,10 +59,11 @@ describe("whatsapp inbound context visibility", () => {
|
59 | 59 | }); |
60 | 60 | |
61 | 61 | expect(history).toEqual([ |
62 | | -expect.objectContaining({ |
| 62 | +{ |
63 | 63 | sender: "Alice (+111)", |
64 | 64 | body: "Allowed context", |
65 | | -}), |
| 65 | +senderJid: "111@s.whatsapp.net", |
| 66 | +}, |
66 | 67 | ]); |
67 | 68 | }); |
68 | 69 | |
@@ -85,12 +86,15 @@ describe("whatsapp inbound context visibility", () => {
|
85 | 86 | groupAllowFrom: ["+111"], |
86 | 87 | }); |
87 | 88 | |
88 | | -expect(reply).toMatchObject({ |
| 89 | +expect(reply).toEqual({ |
89 | 90 | id: "blocked-reply", |
90 | 91 | body: "Blocked quoted text", |
91 | | -sender: expect.objectContaining({ |
| 92 | +sender: { |
| 93 | +jid: "999@s.whatsapp.net", |
| 94 | +lid: null, |
| 95 | +e164: "+999", |
92 | 96 | label: "Mallory (+999)", |
93 | | -}), |
| 97 | +}, |
94 | 98 | }); |
95 | 99 | }); |
96 | 100 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。