Skip to content

Commit

Permalink
add fetch case for contribution header get call
Browse files Browse the repository at this point in the history
  • Loading branch information
marjisound committed Oct 16, 2024
1 parent 8a70625 commit 2249e2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dotcom-rendering/src/lib/mockRESTCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ export const mockFetch: typeof global.fetch = (
url,
) && requestInit?.method === 'POST':
return createMockResponse(200, contributionsHeaderResponse);
// Get contributions header
case /.*contributions\.(code\.dev-)?guardianapis\.com\/header/.test(
url,
):
return createMockResponse(200, contributionsHeaderResponse);
// Get Ophan
case /.*ophan\.theguardian\.com\/img\/.*/.test(url):
return createMockResponse(200);
Expand Down

0 comments on commit 2249e2a

Please sign in to comment.