test: tighten imessage inbound assertion · openclaw/openclaw@1ba3a2c
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/imessage/src/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -120,22 +120,21 @@ describe("resolveIMessageInboundDecision echo detection", () => {
|
120 | 120 | const selfChatCache = createSelfChatCache(); |
121 | 121 | const createdAt = "2026-03-02T20:58:10.649Z"; |
122 | 122 | |
123 | | -expect( |
124 | | -await resolveDecision({ |
125 | | -message: { |
126 | | -id: 9641, |
127 | | -sender: "+15555550123", |
128 | | -chat_identifier: "+15555550123", |
129 | | -destination_caller_id: "+15555550123", |
130 | | -text: "Do you want to report this issue?", |
131 | | -created_at: createdAt, |
132 | | -is_from_me: true, |
133 | | -}, |
134 | | -messageText: "Do you want to report this issue?", |
135 | | -bodyText: "Do you want to report this issue?", |
136 | | - selfChatCache, |
137 | | -}), |
138 | | -).toMatchObject({ kind: "dispatch" }); |
| 123 | +const fromMeDecision = await resolveDecision({ |
| 124 | +message: { |
| 125 | +id: 9641, |
| 126 | +sender: "+15555550123", |
| 127 | +chat_identifier: "+15555550123", |
| 128 | +destination_caller_id: "+15555550123", |
| 129 | +text: "Do you want to report this issue?", |
| 130 | +created_at: createdAt, |
| 131 | +is_from_me: true, |
| 132 | +}, |
| 133 | +messageText: "Do you want to report this issue?", |
| 134 | +bodyText: "Do you want to report this issue?", |
| 135 | + selfChatCache, |
| 136 | +}); |
| 137 | +expect(fromMeDecision.kind).toBe("dispatch"); |
139 | 138 | |
140 | 139 | expect( |
141 | 140 | await resolveDecision({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。