From 93db24b7f7650abac1bb7095026e3a1f367b0c0a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 11 Dec 2023 17:52:38 +0100 Subject: refactor(pages): refine Contact page * remove next/router dependency * remove pageTitle since it is defined in MDX * reduce statements by grouping messages * mock response with MSW and add test for sendEmail --- tests/msw/instances/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/msw/instances') diff --git a/tests/msw/instances/index.ts b/tests/msw/instances/index.ts index 82218c3..2e2dfeb 100644 --- a/tests/msw/instances/index.ts +++ b/tests/msw/instances/index.ts @@ -1,7 +1,8 @@ import { graphql } from 'msw'; import { GITHUB_API } from '../../../src/utils/constants'; -const wordpressGraphQLUrl = process.env.NEXT_PUBLIC_STAGING_GRAPHQL_API; +const { env } = { ...process, ...window.process }; +const wordpressGraphQLUrl = env.NEXT_PUBLIC_STAGING_GRAPHQL_API; if (!wordpressGraphQLUrl) throw new Error('You forgot to define an URL for the WordPress GraphQL API'); -- cgit v1.2.3