diff --git a/src/gateway/server-methods/diagnostics.test.ts b/src/gateway/server-methods/diagnostics.test.ts index 4f0197e3f4d..78870bec6a6 100644 --- a/src/gateway/server-methods/diagnostics.test.ts +++ b/src/gateway/server-methods/diagnostics.test.ts @@ -48,7 +48,8 @@ describe("diagnostics gateway methods", () => { }); expect(respond).toHaveBeenCalledTimes(1); - expect(respond.mock.calls.at(0)).toEqual([ + const firstRespondCall = respond.mock.calls[0]; + expect(firstRespondCall).toEqual([ true, { generatedAt: now.toISOString(), @@ -84,9 +85,7 @@ describe("diagnostics gateway methods", () => { }, undefined, ]); - expect( - Object.keys(respond.mock.calls.at(0)?.[1] as Record).toSorted(), - ).toEqual([ + expect(Object.keys(firstRespondCall?.[1] as Record).toSorted()).toEqual([ "capacity", "count", "dropped",