test: tighten device pair notify assertions

This commit is contained in:
Shakker
2026-05-11 08:48:55 +01:00
parent 799bd8a23b
commit 004bb2013e

View File

@@ -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: {},
});
});
});