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.

Tests should send mocked requests to fake hostname

See original GitHub issue

Let’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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
gr2mcommented, Feb 14, 2019

I think .test is made for exactly this use case, see https://en.wikipedia.org/wiki/.test

The name test is a top-level domain (TLD) that is intended for use in the testing of software.

2reactions
paulmelnikowcommented, Jan 6, 2019

Go 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. 😁

Read more comments on GitHub >

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

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