aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msw/handlers/posts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-12-11 18:47:59 +0100
committerArmand Philippot <git@armandphilippot.com>2023-12-11 18:55:07 +0100
commit1c20e06da5a9817c15c80ca5a25cfacf8eeb0485 (patch)
tree0162c375602baa70e51d38bdec143dc645628e96 /tests/msw/handlers/posts
parent93db24b7f7650abac1bb7095026e3a1f367b0c0a (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')
-rw-r--r--tests/msw/handlers/posts/post.handler.ts4
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>;