From b4982f8d3ad60175a4558a9842c534d2b42a2364 Mon Sep 17 00:00:00 2001 From: Marjan Kalanaki Date: Tue, 15 Oct 2024 16:14:36 +0100 Subject: [PATCH] add fetch case for contribution header get call --- dotcom-rendering/src/lib/mockRESTCalls.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dotcom-rendering/src/lib/mockRESTCalls.ts b/dotcom-rendering/src/lib/mockRESTCalls.ts index c96a7316dc5..4b4f132c83f 100644 --- a/dotcom-rendering/src/lib/mockRESTCalls.ts +++ b/dotcom-rendering/src/lib/mockRESTCalls.ts @@ -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);