mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-20 09:17:51 +00:00
test: tighten device pair notify assertions
This commit is contained in:
parent
799bd8a23b
commit
004bb2013e
1 changed files with 11 additions and 5 deletions
|
|
@ -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: {},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue