Error: Nock: No match for HTTP request (should be matching)
See original GitHub issueHey guys, I’m having trouble with matched requests. I’m seeing Error: Nock: No match for HTTP request GET /1.1/users/lookup.json?user_id=&screen_name=lefnire
, yet that exact URL is nocked in my code. It’s weird because using .log(console.log)
I see the Error: Nock: No matches
, then at the end see AssertionError: Mocks not yet satisfied
with all the previous no-matches verbatim.
Here’s my code (stripped everything not relevant), and here’s my error.
Issue Analytics
- State:
- Created 11 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Error: Nock: No match for request - Stack Overflow
If it says true, your request should be good. But if it says false, check both the requests and make sure they match....
Read more >Nock: No match for request · Issue #1049 - GitHub
I get the following error: error: Couldn't fetch foursquare data Error: Nock: No match for request { "method": "GET", ...
Read more >No match error when testing an Express.js controller doing ...
My intent was to mock these calls using the great "HTTP server mocking and expectations library for Node.js" Nock. This intent take the...
Read more >[Solved]-Error: Nock: No match for request-node.js
It looks like you only setup interceptor once and expect it to work for every request. If you want your interceptors to persist...
Read more >Nock Headers Error: Nock: No Match For Request - ADocLib
Solvednock No match for request POST even nock successfully matched request for each request you are going to have otherwise nock will throw...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I added this experimental feature to v0.14.0:
https://github.com/flatiron/nock#persist
Please reopen this if that doesn’t work.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!