Replies: 1 comment 2 replies
-
I have gone through the docs of jest-openapi. Seems the response object accepted by This is an interesting use case and I would like to see As a work around, this might do the trick. const res = await pactum.spec().get('/account/stats').expectStatus(200);
res['_json '] = res.json;
await expect(await res).toSatisfyApiSpec(); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! Now I'm using supertest + jest-openapi for asserting that HTTP responses satisfy an OpenAPI spec. But I mainly plan to use PactumJS on a project for others assertions and have idea also use for this PactumJS. I'm trying to create assertion OpenApi like this:
And getting error: "TypeError: Cannot read property '_json' of undefined" . How send request or prepare response with PactumJS for assertion OpenAPI spec?
Beta Was this translation helpful? Give feedback.
All reactions