mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: dedupe qa credential lease mock read
This commit is contained in:
@@ -14,7 +14,7 @@ function jsonResponse(payload: unknown, status = 200) {
|
||||
type FetchMock = { mock: { calls: Parameters<typeof fetch>[] } };
|
||||
|
||||
function fetchCall(fetchImpl: FetchMock, index = 0): Parameters<typeof fetch> {
|
||||
const call = fetchImpl.mock.calls.at(index);
|
||||
const call = fetchImpl.mock.calls[index];
|
||||
if (!call) {
|
||||
throw new Error(`expected fetch call ${index}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user