-
-
Notifications
You must be signed in to change notification settings - Fork 736
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
Nock test suite breaking on Node 8.x #922
Comments
My tests are breaking in Node.js 8. Something simple like: nock('http://example.com')
.get('/')
.reply(200, 'Hi!'); Doesn't get intercepted. Using Node.js 7 it does. |
@stevenvachon If you need to mock something in Node.js 8 now I just bashed create-test-server together. No docs yet but you can see example usage here: |
@lukechilds thank you, but I transitioned from a real test server to nock a while ago and don't want to go back to it |
I also run into this issue I see there is already a PR to make nock node 8 ready. I hope it will reviewed fast. |
@StarpTech that PR doesn't pass tests, so it's not yet of any use. |
@stevenvachon He said that there is only one browserify test failing. Thats a great base. BTW I think I will change to https://github.com/ctimmerm/axios-mock-adapter in combination with the excellent axios http request library. This not a solution for everybody but a much cleaner way to mock http calls in node. |
Nock is currently not compatible with Node 8: nock/nock#922
This PR seems to fix the issue: #929 For my own project, where I only use nock to mock responses, I've monkey-patched nock to get the tests to pass: Rob--W/cors-anywhere@70400ab (tested with nock 8.2.1). |
Should be fixed in 9.0.14. Please reopen if issue persists. |
9.0.14 includes nock/nock#929 which fixes nock/nock#922 and nock/nock#925 which prevented nock from working on Node 8 and later. Now test everything on all supported Node versions. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
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! |
The text was updated successfully, but these errors were encountered: