'Emulate Angular12 Http Call Timeout in Jasmine
I have a service that makes an HTTP call to the backend and if the call fails due to timeout, I display the error message in the UI saying that the call has timed out. Now, I need to write test case for this scenario and emulate HTTP call timeout and check if the error message is displayed.
Timeout error to be emulated {message: 'Timeout has occurred', name: 'TimeoutError'}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
