mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 19:15:47 +00:00
test: tighten commitment heartbeat assertion
This commit is contained in:
parent
55b4fc880c
commit
9859c23bad
1 changed files with 9 additions and 7 deletions
|
|
@ -110,13 +110,15 @@ describe("commitments heartbeat delivery policy e2e", () => {
|
|||
expect(result.status).toBe("ran");
|
||||
expect(sendTelegram).not.toHaveBeenCalled();
|
||||
const store = await loadCommitmentStore();
|
||||
expect(store.commitments[0]).toMatchObject({
|
||||
id: "cm_target_none",
|
||||
status: "pending",
|
||||
attempts: 0,
|
||||
});
|
||||
expect(store.commitments[0]).not.toHaveProperty("sourceUserText");
|
||||
expect(store.commitments[0]).not.toHaveProperty("sourceAssistantText");
|
||||
const [persistedCommitment] = store.commitments;
|
||||
if (!persistedCommitment) {
|
||||
throw new Error("missing persisted commitment");
|
||||
}
|
||||
expect(persistedCommitment.id).toBe("cm_target_none");
|
||||
expect(persistedCommitment.status).toBe("pending");
|
||||
expect(persistedCommitment.attempts).toBe(0);
|
||||
expect(persistedCommitment).not.toHaveProperty("sourceUserText");
|
||||
expect(persistedCommitment).not.toHaveProperty("sourceAssistantText");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue