diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-12-11 17:52:38 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-12-11 17:52:38 +0100 |
| commit | 93db24b7f7650abac1bb7095026e3a1f367b0c0a (patch) | |
| tree | c6efd8669d333941494e573d2468a4fb6603b134 /tests/msw/instances | |
| parent | cd2cb5748be9e9c479d9802dd3897de1cd1cbd9f (diff) | |
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
Diffstat (limited to 'tests/msw/instances')
| -rw-r--r-- | tests/msw/instances/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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'); |
