diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-12-11 18:47:59 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-12-11 18:55:07 +0100 |
| commit | 1c20e06da5a9817c15c80ca5a25cfacf8eeb0485 (patch) | |
| tree | 0162c375602baa70e51d38bdec143dc645628e96 /tests/msw/handlers/posts/post.handler.ts | |
| parent | 93db24b7f7650abac1bb7095026e3a1f367b0c0a (diff) | |
test(services): add tests for createComment mutation
* add Jest test
* add a Cypress test in article pages spec
Diffstat (limited to 'tests/msw/handlers/posts/post.handler.ts')
| -rw-r--r-- | tests/msw/handlers/posts/post.handler.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/msw/handlers/posts/post.handler.ts b/tests/msw/handlers/posts/post.handler.ts index 72f7b95..57f415b 100644 --- a/tests/msw/handlers/posts/post.handler.ts +++ b/tests/msw/handlers/posts/post.handler.ts @@ -14,7 +14,9 @@ export const postHandler = wordpressAPI.query< source: query, variableValues: variables, rootValue: { - post: wpPostsFixture.find((wpPost) => wpPost.slug === variables.slug), + post: wpPostsFixture.find((wpPost) => + wpPost.slug.includes(variables.slug) + ), }, })) as ExecutionResult<PostResponse>; |
