mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 19:24:46 +00:00
test: tighten device pair notify assertions
This commit is contained in:
@@ -149,11 +149,17 @@ describe("device-pair notify persistence", () => {
|
||||
|
||||
const persisted = JSON.parse(
|
||||
await fs.readFile(path.join(stateDir, "device-pair-notify.json"), "utf8"),
|
||||
) as { subscribers: Array<{ to: string; accountId?: string }> };
|
||||
expect(persisted.subscribers).toHaveLength(1);
|
||||
expect(persisted.subscribers[0]).toMatchObject({
|
||||
to: "chat|123",
|
||||
accountId: "acct",
|
||||
) as unknown;
|
||||
expect(persisted).toStrictEqual({
|
||||
subscribers: [
|
||||
{
|
||||
to: "chat|123",
|
||||
accountId: "acct",
|
||||
mode: "persistent",
|
||||
addedAtMs: 1,
|
||||
},
|
||||
],
|
||||
notifiedRequestIds: {},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user