test: tighten discord component context assertions · openclaw/openclaw@1bf6bd3
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/discord/src/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -190,12 +190,16 @@ describe("agent components", () => {
|
190 | 190 | }); |
191 | 191 | |
192 | 192 | expect(defer).not.toHaveBeenCalled(); |
193 | | -expect(ctx).toMatchObject({ |
| 193 | +expect(ctx).toEqual({ |
194 | 194 | channelId: "group-dm-channel", |
| 195 | +user: { id: "123456789", username: "Alice", discriminator: "1234" }, |
| 196 | +username: "Alice#1234", |
| 197 | +userId: "123456789", |
| 198 | +replyOpts: { ephemeral: true }, |
195 | 199 | isDirectMessage: false, |
196 | 200 | isGroupDm: true, |
| 201 | +memberRoleIds: [], |
197 | 202 | rawGuildId: undefined, |
198 | | -userId: "123456789", |
199 | 203 | }); |
200 | 204 | }); |
201 | 205 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。