Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowUnmocked: true + regexp host = interception fail #1076

Closed
cadebward opened this issue Feb 27, 2018 · 5 comments
Closed

allowUnmocked: true + regexp host = interception fail #1076

cadebward opened this issue Feb 27, 2018 · 5 comments

Comments

@cadebward
Copy link

cadebward commented Feb 27, 2018

Similar to #1034, using regex in the host with allowUnmocked = true, fails to intercept.

nock(/localhost/, {allowUnmocked: true})
  .get('/no/regex/here')
  .reply(200, 'Match regex');

fetch('http://localhost:3000/no/regex/here') // not intercepted

note: using version 9.2.2

@gr2m
Copy link
Member

gr2m commented Feb 27, 2018

Confirmed, here is a test case: https://runkit.com/gr2m/5a95927a75f2bb00122ffe55

Wanna send a pull request? Even just a test case reproducing the problem would already be helpful :)

@deeptiagrawa
Copy link
Contributor

I am working on a PR for this issue.

@deeptiagrawa
Copy link
Contributor

PR for the issue #1179

@nockbot
Copy link
Collaborator

nockbot commented Jul 31, 2018

🎉 This issue has been resolved in version 9.4.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lock
Copy link

lock bot commented Sep 13, 2018

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!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants