test: tighten discord route assertions · openclaw/openclaw@886bea7
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,10 +10,14 @@ describe("resolveDiscordOutboundSessionRoute", () => {
|
10 | 10 | threadId: "thread-1", |
11 | 11 | }); |
12 | 12 | |
13 | | -expect(route).toMatchObject({ |
14 | | -sessionKey: "agent:main:discord:channel:123", |
| 13 | +expect(route).toEqual({ |
15 | 14 | baseSessionKey: "agent:main:discord:channel:123", |
| 15 | +chatType: "channel", |
| 16 | +from: "discord:channel:123", |
| 17 | +peer: { kind: "channel", id: "123" }, |
| 18 | +sessionKey: "agent:main:discord:channel:123", |
16 | 19 | threadId: "thread-1", |
| 20 | +to: "channel:123", |
17 | 21 | }); |
18 | 22 | }); |
19 | 23 | |
@@ -25,9 +29,13 @@ describe("resolveDiscordOutboundSessionRoute", () => {
|
25 | 29 | replyToId: "message-1", |
26 | 30 | }); |
27 | 31 | |
28 | | -expect(route).toMatchObject({ |
29 | | -sessionKey: "agent:main:discord:channel:123", |
| 32 | +expect(route).toEqual({ |
30 | 33 | baseSessionKey: "agent:main:discord:channel:123", |
| 34 | +chatType: "channel", |
| 35 | +from: "discord:channel:123", |
| 36 | +peer: { kind: "channel", id: "123" }, |
| 37 | +sessionKey: "agent:main:discord:channel:123", |
| 38 | +to: "channel:123", |
31 | 39 | }); |
32 | 40 | expect(route?.threadId).toBeUndefined(); |
33 | 41 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。