-
-
Notifications
You must be signed in to change notification settings - Fork 916
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
Got.js throws ERR_INVALID_ARG_TYPE when mocking with nock on Node 12.x #817
Comments
Are you sure it's not nock/nock#1509? |
@sindresorhus yes, I've tried using other libs and they seem to work fine. |
Make sure you're running at least Let us know then. |
@szmarczak yep, that does indeed fixes it. Somehow misread it and thought fix was shipped in 10.0.6. Sorry for the bother and thanks for help! 😅 |
No problem :) |
See sindresorhus/got#817 Also bump dependencies
As recommended here sindresorhus/got#817
Describe the bug
Trying to use nock with Got in Node 12.x breaks Got with
ERR_INVALID_ARG_TYPE
.Actual behavior
When mocking API with nock.js - on request Got.js throws ERR_INVALID_ARG_TYPE and dies.
Expected behavior
Should correctly handle request to nock server.
Code to reproduce
Here's an interactive demo:
https://runkit.com/yamalight/5cf50559b975d2001a4dfaa8
Switching to Node 10.x fixes the issue. Using e.g. node-fetch instead of Got.js also works correctly with nock.
Checklist
The text was updated successfully, but these errors were encountered: