Tests should send mocked requests to fake hostname
See original GitHub issueLet’s change them all from e.g. example.com
and www.google.com
to example.test
.
See https://github.com/nock/nock/pull/1347#discussion_r245127963
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Mock all requests to a host · Issue #495 · nock/nock
I can't find an easy way to mock all (GET/POST/DELETE etc) requests to a certain hostname for any path. I want to do...
Read more >MockServer
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS. It also proxies, allowing introspection and modification of proxied ......
Read more >Mocking HTTP requests with Nock
Tests that make real HTTP requests to external services can be error-prone for a variety of reasons. Examples include the exact data returned ......
Read more >Mock a Remote Host in Python - unit testing
I think what you really need to mock is paramiko.SSHClient object. You are unittesting your function my_function , you can assume paramiko ...
Read more >API mock testing with Nock for Node.js apps
In this quick tutorial, learn how to make mock HTTP requests with Nock to test your Node.js application's API endpoints.
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 think
.test
is made for exactly this use case, see https://en.wikipedia.org/wiki/.testGo for it!!
I try to be really generous with tagging good first issues. There’s a ton of work that can be done on this project and I don’t think we need to worry about not creating enough of it. 😁