Replies: 1 comment 2 replies
-
It might be due to #2397, I don't know if latest axios is using Node's native |
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 Nock Community,
I'm currently working on an API acceptance test for one of our services, and our product uses microservices. Let's break it down: we have two microservices, microA and microB.
The challenge is testing microA, which relies on microB. Specifically, there's an endpoint in microA called
prepareSth/:id
. This endpoint makes an internal call to another endpoint in microB.Here's a simplified code snippet:
I'm using Cucumber for acceptance tests, and I have a question: Can I use Nock to mock the response of the axios call from microB?
Here's an excerpt from my step definition file:
I attempted to use Nock at the beginning of this step definition file like this:
However, the mocked endpoint is not being used. Any insights or guidance on achieving this with Nock would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions