diff --git a/apps/web/src/lib/external-services.test.ts b/apps/web/src/lib/external-services.test.ts index b31589d4c2..a16083d083 100644 --- a/apps/web/src/lib/external-services.test.ts +++ b/apps/web/src/lib/external-services.test.ts @@ -226,8 +226,8 @@ describe('external-services', () => { // Verify no calls to Stripe endpoints (only Customer.io and session worker calls) const fetchCalls = (global.fetch as jest.Mock).mock.calls; - const stripeCalls = fetchCalls.filter((call: [string, RequestInit]) => - call[0].includes('api.stripe.com') + const stripeCalls = fetchCalls.filter( + (call: [string, RequestInit]) => new URL(call[0]).hostname === 'api.stripe.com' ); expect(stripeCalls.length).toBe(0); });