question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nock doesn't reply when data to be sent is `false`

See original GitHub issue

Consider 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:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mastermattcommented, May 7, 2019

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.

0reactions
mastermattcommented, Jun 8, 2019

This was fixed with #1520 and is currently in the v11 beta branch.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found