Skip to content

Commit 00d0d4b

Browse files
committed
test: guard nodes approval mock calls
1 parent 04a868b commit 00d0d4b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/cli/nodes-cli/register.invoke.approval-transport-timeout.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe("exec approval transport timeout (#12098)", () => {
4848
});
4949

5050
expect(callGatewaySpy).toHaveBeenCalledTimes(1);
51-
const callOpts = callGatewaySpy.mock.calls[0][0];
51+
const callOpts = callGatewaySpy.mock.calls.at(0)![0];
5252
expect(callOpts.method).toBe("exec.approval.request");
5353
expect(callOpts.timeoutMs).toBe(35_000);
5454
});
@@ -67,7 +67,7 @@ describe("exec approval transport timeout (#12098)", () => {
6767
);
6868

6969
expect(callGatewaySpy).toHaveBeenCalledTimes(1);
70-
const callOpts = callGatewaySpy.mock.calls[0][0];
70+
const callOpts = callGatewaySpy.mock.calls.at(0)![0];
7171
expect(callOpts.timeoutMs).toBeGreaterThanOrEqual(approvalTimeoutMs);
7272
expect(callOpts.timeoutMs).toBe(approvalTransportFloorMs);
7373
});
@@ -89,7 +89,7 @@ describe("exec approval transport timeout (#12098)", () => {
8989
{ transportTimeoutMs },
9090
);
9191

92-
const callOpts = callGatewaySpy.mock.calls[0][0];
92+
const callOpts = callGatewaySpy.mock.calls.at(0)![0];
9393
expect(callOpts.timeoutMs).toBe(approvalTransportFloorMs);
9494
});
9595

@@ -107,7 +107,7 @@ describe("exec approval transport timeout (#12098)", () => {
107107
{ transportTimeoutMs },
108108
);
109109

110-
const callOpts = callGatewaySpy.mock.calls[0][0];
110+
const callOpts = callGatewaySpy.mock.calls.at(0)![0];
111111
expect(callOpts.timeoutMs).toBe(approvalTransportFloorMs);
112112
});
113113
});

0 commit comments

Comments
 (0)