test: dedupe brave fetch mock read

This commit is contained in:
Peter Steinberger
2026-05-13 06:01:46 +01:00
parent f141a086fc
commit 5c67c93ac9

View File

@@ -73,7 +73,7 @@ function readHeader(init: unknown, name: string): string | null {
} }
function fetchCall(mockFetch: { mock: { calls: Array<Array<unknown>> } }, index = 0) { function fetchCall(mockFetch: { mock: { calls: Array<Array<unknown>> } }, index = 0) {
const call = mockFetch.mock.calls.at(index); const call = mockFetch.mock.calls[index];
if (!call) { if (!call) {
throw new Error(`Expected fetch call ${index + 1}`); throw new Error(`Expected fetch call ${index + 1}`);
} }