-
-
Notifications
You must be signed in to change notification settings - Fork 935
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
v11 beta feedback #1154
Comments
Nice work! Only spent a few minutes with it and already excited that we are able to provide typed mocks in Jest similar to v9. I couldn't figure out how to cleanly do it in v10. example using v11.0.0-beta.1 mocked(got.get).mockReturnValue({
json: jest.fn().mockResolvedValue([
{
id: 8982,
name: 'Ready for Review'
}
])
}); |
Just updated like-for-like and a couple of notes:
|
When we've fixed the biggest blocker issues that turn up here. It's already feature complete. |
|
My only concern would have been AWS Lambda, which appears to be using Node.js 10.19.0 with stable support, so can consider that a non-issue |
Ummm, cached responses don't have timings... Can you reproduce the issue in a RunKit example? |
The |
I mean cached but with a revalidation, so a 304 response from the server. Before, these had no timings, despite making an actual request to the remote server |
Is there a fix? I have no custom code for stream.pipeline |
Not sure how to interpret this sentence. Are you saying that you are using |
I'm saying that I'm using a very basic implementation of |
So you are not using |
The example gives no errors. It's perfectly valid. |
Sorry the example was slightly wrong. Here's got v11: https://runkit.com/simontabor/got-nock-v11/1.0.0 In v10, you get the proper error (no matched request), in v11, i get socket hang up |
You still haven't answered the question... :P But that example looks very promising, thanks for submitting! |
If the request errors, the request is aborted. It's just that |
haha sorry, doing too many things at once - no I'm not using stream.pipeline. Sounds like it's an issue with |
If you're talking about the The |
@simontabor Your example made me discover another Node.js bug located in its core. If you |
If you do |
Temporarily commenting out the |
I made a workaround for the Node.js issue: c15e020 |
I would still love to be able to specify a replacement for |
It's on the list: #875 Once Got 11 is released, I'll start to work on the |
Good to know. As I said before, let us know if you need any help in coding.
…On 19 Apr 2020, 3:47 PM +0530, Szymon Marczak ***@***.***>, wrote:
It's on the list: #875 Once Got 11 is released, I'll start to work on the enhancement issues and update our dependencies.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Got v11 is out: https://github.com/sindresorhus/got/releases/tag/v11.0.0 ✨ |
We just published the first beta for Got v11. Try it out and let us know: https://github.com/sindresorhus/got/releases/tag/v11.0.0-beta.1
The text was updated successfully, but these errors were encountered: