test: clarify system presence pruning assertions · openclaw/openclaw@a5e9b20
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -109,12 +109,12 @@ describe("system-presence", () => {
|
109 | 109 | reason: "connect", |
110 | 110 | }); |
111 | 111 | |
112 | | -expect(listSystemPresence().some((entry) => entry.deviceId === deviceId)).toBe(true); |
| 112 | +expect(listSystemPresence().map((entry) => entry.deviceId)).toContain(deviceId); |
113 | 113 | |
114 | 114 | vi.advanceTimersByTime(5 * 60 * 1000 + 1); |
115 | 115 | |
116 | 116 | const entries = listSystemPresence(); |
117 | | -expect(entries.some((entry) => entry.deviceId === deviceId)).toBe(false); |
118 | | -expect(entries.some((entry) => entry.reason === "self")).toBe(true); |
| 117 | +expect(entries.map((entry) => entry.deviceId)).not.toContain(deviceId); |
| 118 | +expect(entries.map((entry) => entry.reason)).toContain("self"); |
119 | 119 | }); |
120 | 120 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。