Skip to content

Commit 8fd0f99

Browse files
committed
test: dedupe google chat mock reads
1 parent 39bcd1e commit 8fd0f99

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

extensions/googlechat/src/google-auth.runtime.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ afterAll(() => {
7272
});
7373

7474
function mockCallArg(mock: ReturnType<typeof vi.fn>, callIndex = 0, argIndex = 0): unknown {
75-
const call = mock.mock.calls.at(callIndex);
75+
const call = mock.mock.calls[callIndex];
7676
if (!call) {
7777
throw new Error(`Expected mock call ${callIndex}`);
7878
}
79-
return call.at(argIndex);
79+
return call[argIndex];
8080
}
8181

8282
describe("googlechat google auth runtime", () => {

extensions/googlechat/src/targets.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ async function expectDownloadToRejectForResponse(response: Response) {
110110
}
111111

112112
function mockCallArg(mock: ReturnType<typeof vi.fn>, callIndex = 0, argIndex = 0): unknown {
113-
const call = mock.mock.calls.at(callIndex);
113+
const call = mock.mock.calls[callIndex];
114114
if (!call) {
115115
throw new Error(`Expected mock call ${callIndex}`);
116116
}
117-
return call.at(argIndex);
117+
return call[argIndex];
118118
}
119119

120120
describe("normalizeGoogleChatTarget", () => {

0 commit comments

Comments
 (0)