test: tighten msteams store normalization assertion · openclaw/openclaw@a33b35e
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -45,11 +45,15 @@ describe.each(storeFactories)("msteams conversation store ($name)", ({ createSto
|
45 | 45 | user: { id: "u1" }, |
46 | 46 | }); |
47 | 47 | |
48 | | -await expect(store.get("conv-norm")).resolves.toEqual( |
49 | | -expect.objectContaining({ |
50 | | -conversation: { id: "conv-norm" }, |
51 | | -}), |
52 | | -); |
| 48 | +const normalized = await store.get("conv-norm"); |
| 49 | +expect(normalized).toEqual({ |
| 50 | +conversation: { id: "conv-norm" }, |
| 51 | +channelId: "msteams", |
| 52 | +serviceUrl: "https://service.example.com", |
| 53 | +user: { id: "u1" }, |
| 54 | +lastSeenAt: normalized?.lastSeenAt, |
| 55 | +}); |
| 56 | +expect(typeof normalized?.lastSeenAt).toBe("string"); |
53 | 57 | await expect(store.remove("conv-norm")).resolves.toBe(true); |
54 | 58 | await expect(store.get("conv-norm;messageid=123")).resolves.toBeNull(); |
55 | 59 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。