From 1c20e06da5a9817c15c80ca5a25cfacf8eeb0485 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 11 Dec 2023 18:47:59 +0100 Subject: test(services): add tests for createComment mutation * add Jest test * add a Cypress test in article pages spec --- tests/msw/handlers/posts/post.handler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/msw/handlers/posts/post.handler.ts') 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; -- cgit v1.2.3