test: dedupe sessions cleanup mock reads · openclaw/openclaw@5188607
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -247,7 +247,7 @@ describe("sessionsCleanupCommand", () => {
|
247 | 247 | appliedCount: 1, |
248 | 248 | }); |
249 | 249 | expect(mocks.runSessionsCleanup).toHaveBeenCalledOnce(); |
250 | | -const cleanupCall = mocks.runSessionsCleanup.mock.calls.at(0)?.[0]; |
| 250 | +const cleanupCall = mocks.runSessionsCleanup.mock.calls[0]?.[0]; |
251 | 251 | expect(cleanupCall?.cfg).toEqual({ session: { store: "/cfg/sessions.json" } }); |
252 | 252 | expect(cleanupCall?.opts.enforce).toBe(true); |
253 | 253 | expect(cleanupCall?.opts.activeKey).toBe("agent:main:main"); |
@@ -284,7 +284,7 @@ describe("sessionsCleanupCommand", () => {
|
284 | 284 | ); |
285 | 285 | |
286 | 286 | expect(mocks.callGateway).toHaveBeenCalledOnce(); |
287 | | -const gatewayCall = mocks.callGateway.mock.calls.at(0)?.[0]; |
| 287 | +const gatewayCall = mocks.callGateway.mock.calls[0]?.[0]; |
288 | 288 | expect(gatewayCall?.method).toBe("sessions.cleanup"); |
289 | 289 | expect(gatewayCall?.params.enforce).toBe(true); |
290 | 290 | expect(gatewayCall?.requiredMethods).toEqual(["sessions.cleanup"]); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。