test: tighten device pair notify assertions · openclaw/openclaw@004bb20
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -149,11 +149,17 @@ describe("device-pair notify persistence", () => {
|
149 | 149 | |
150 | 150 | const persisted = JSON.parse( |
151 | 151 | await fs.readFile(path.join(stateDir, "device-pair-notify.json"), "utf8"), |
152 | | -) as { subscribers: Array<{ to: string; accountId?: string }> }; |
153 | | -expect(persisted.subscribers).toHaveLength(1); |
154 | | -expect(persisted.subscribers[0]).toMatchObject({ |
155 | | -to: "chat|123", |
156 | | -accountId: "acct", |
| 152 | +) as unknown; |
| 153 | +expect(persisted).toStrictEqual({ |
| 154 | +subscribers: [ |
| 155 | +{ |
| 156 | +to: "chat|123", |
| 157 | +accountId: "acct", |
| 158 | +mode: "persistent", |
| 159 | +addedAtMs: 1, |
| 160 | +}, |
| 161 | +], |
| 162 | +notifiedRequestIds: {}, |
157 | 163 | }); |
158 | 164 | }); |
159 | 165 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。