test: tighten isolated cron assertions · openclaw/openclaw@8ad588d
steipete
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -132,12 +132,11 @@ describe("runCronIsolatedAgentTurn — interim ack retry", () => {
|
132 | 132 | |
133 | 133 | expect(result.status).toBe("error"); |
134 | 134 | expect(result.error).toBe("SYSTEM_RUN_DENIED: approval required"); |
135 | | -expect(dispatchCronDeliveryMock).toHaveBeenCalledWith( |
136 | | -expect.objectContaining({ |
137 | | -skipHeartbeatDelivery: false, |
138 | | -deliveryPayloads: [{ text: "SYSTEM_RUN_DENIED: approval required", isError: true }], |
139 | | -}), |
140 | | -); |
| 135 | +const deliveryRequest = dispatchCronDeliveryMock.mock.calls[0]?.[0]; |
| 136 | +expect(deliveryRequest?.skipHeartbeatDelivery).toBe(false); |
| 137 | +expect(deliveryRequest?.deliveryPayloads).toEqual([ |
| 138 | +{ text: "SYSTEM_RUN_DENIED: approval required", isError: true }, |
| 139 | +]); |
141 | 140 | }); |
142 | 141 | |
143 | 142 | it("does not retry when descendants were spawned in this run even if they already settled", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。