test: dedupe acp lifecycle mock reads

This commit is contained in:
Peter Steinberger
2026-05-13 04:29:54 +01:00
parent 280d7931c1
commit 92c84bbee4

View File

@@ -99,7 +99,7 @@ function mockReadySession(params: {
function expectCloseArgs(): Record<string, unknown> {
expect(managerMocks.closeSession).toHaveBeenCalledTimes(1);
const call = managerMocks.closeSession.mock.calls.at(0);
const call = managerMocks.closeSession.mock.calls[0];
if (!call) {
throw new Error("expected closeSession call");
}
@@ -108,7 +108,7 @@ function expectCloseArgs(): Record<string, unknown> {
function expectInitializeArgs(): Record<string, unknown> {
expect(managerMocks.initializeSession).toHaveBeenCalledTimes(1);
const call = managerMocks.initializeSession.mock.calls.at(0);
const call = managerMocks.initializeSession.mock.calls[0];
if (!call) {
throw new Error("expected initializeSession call");
}