mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat(api): POST /ms-trophy-challenge-completed (#51808)
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6163330b70
commit
135812162e
@@ -109,3 +109,12 @@ export async function seedExam(): Promise<void> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function createFetchMock({ ok = true, body = {} } = {}) {
|
||||
return jest.fn().mockResolvedValue(
|
||||
Promise.resolve({
|
||||
ok,
|
||||
json: () => Promise.resolve(body)
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user