Make it clearer that `timeout` configuration affects mocked as well as non-mocked requests
See original GitHub issueIn cy.request()
and also main configuration doc, make it clearer that responseTimeout
applies to mocked as well as non-mocked requests.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Cypress reports a timeout for a XHR request not made through ...
Make it clearer that timeout configuration affects mocked as well as non-mocked requests cypress-io/cypress-documentation#1046.
Read more >Python Requests Mock doesn't catch Timeout exception
get method of the directly imported and therefore on the original requests module, which means that change is not reflected within your module....
Read more >Mocking time and testing event loops in Go - Dmitry Frank
The // second is a mock clock which will only make forward progress when // programmatically adjusted. type Clock interface { After(d time....
Read more >A Unit Testing Practitioner's Guide to Everyday Mockito - Toptal
In this article, we'll cover multiple mock interfaces, listening invocations, matchers, and argument captors, and see firsthand how Mockito makes your tests ...
Read more >Understanding the Python Mock Object Library - Real Python
You can test how get_holidays() will respond to a connection timeout by setting requests.get.side_effect . For this example, you'll only see the relevant...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What is unclear about this issue? The issue is that
responseTimeout
controls timeouts of XHR requests, which is not really documented anywhere. So I think there is a bit of confusion that XHR requests can be both mocked or not. And even when XHR are not being mocked,responseTimeout
still is in effect. In this waycy.request
by-passes any mocking, but documentation only says thatresponseTimeout
influencescy.request
. So maybe this is why this confusion about mocking and non-mocking?It is simply surprising that if I do not want to mock anything, some arbitrary additional not-documented timeout is inserted into my XHR requests. So maybe a reference to
cy.request()
was made by mistake. My issue was with XHR.I also made a new comment here: https://github.com/cypress-io/cypress/issues/2592#issuecomment-471764542