Replies: 1 comment 1 reply
-
const { spec } = require('pactum');
const { includes } = require('pactum-matchers');
await spec()
.get('/some/api')
.expectJsonMatch("title", includes("World")); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to check that property of a json, contains a string?
When I use something like:
I get an error
Json doesn't have type 'object' at '$' but found 'string'
. I tried quite a few other combinations, but they results in a similar error.I saw a discussion about "expectJsonSnapshot", but it complains about snapshot name, so I think it's the wrong function for my use case.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions