"Error: Nock: No match for request" How to quickly understand what doesn't match?

I often face this error (Error: Nock: No match for request) using Nock, but I find it hard to quickly understand what doesn’t match in order to adjust.

I used to use nock(apiUrl).persist().log(console.log)(link) that was doing the job pretty well. But it’s been deprecated and I’ve recently updated the dependancy. Therefore I need to adapt, yet I find it hard to grasp what info is interesting for my debugging.

How to get something similar to Jest, obviously comparing what was expected, and what was actually called for quick and straightforward debugging ?

18 thoughts on “"Error: Nock: No match for request" How to quickly understand what doesn't match?”

Leave a Comment