docs(aio): update docs error in guide/http (#23567)
Updates documentation to include examples for both req.flush and req.error in http testing examples. PR Close #23567
This commit is contained in:

committed by
Igor Minar

parent
1ab5fba92e
commit
2e5457c824
@ -150,7 +150,7 @@ describe('HttpClient testing', () => {
|
||||
|
||||
// Create mock ErrorEvent, raised when something goes wrong at the network level.
|
||||
// Connection timeout, DNS error, offline, etc
|
||||
const errorEvent = new ErrorEvent('so sad', {
|
||||
const mockError = new ErrorEvent('Network error', {
|
||||
message: emsg,
|
||||
// #enddocregion network-error
|
||||
// The rest of this is optional and not used.
|
||||
@ -162,7 +162,7 @@ describe('HttpClient testing', () => {
|
||||
});
|
||||
|
||||
// Respond with mock error
|
||||
req.error(errorEvent);
|
||||
req.error(mockError);
|
||||
});
|
||||
// #enddocregion network-error
|
||||
|
||||
|
Reference in New Issue
Block a user