Nock doesn't reply when data to be sent is `false`
See original GitHub issueConsider the snippet:
const fakeServer = nock('https://example.com')
.get('/getSomething')
.reply(httpOK, false);
What is the expected behavior?
The return value when queried the host should be false
.
What is the actual behavior? The query returns nothing.
Possible solution Couldn’t figure it.
How to reproduce the issue
Runkit: https://runkit.com/mukkachaitanya/5c5c25d7a3eb1d00121f6041
Versions
Software | Version(s) |
---|---|
Nock | 10.0.6 |
Node | 10.15.0 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
"Error: Nock: No match for request" How to quickly understand ...
I often face this error ( Error: Nock: No match for request ) using Nock, but I find it hard to quickly understand...
Read more >nock - npm
HTTP server mocking and expectations library for Node.js. Latest version: 13.2.9, last published: 2 months ago. Start using nock in your ...
Read more >How do you know what's gone wrong when your API request ...
When an API request doesn't work, hopefully the client receives a sensible HTTP error status, like 409 or 500, which is a good...
Read more >mocking outbound http requests in go: you're (probably) doing ...
mocking outbound http requests in go: you're (probably) doing it wrong. Mockingbird image courtesy of Sheila Brown (CC0).
Read more >If I message a girl a couple of times, and she doesn't respond ...
Based on your other comment, you did the right thing by waiting a little for a response then trying again— nothing wrong in...
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
Sounds good. I still need to go back and work on that PR, but I’ll add a test for this use case and ensure it works.
This was fixed with #1520 and is currently in the v11 beta branch.