ГЩ
При необходимости мутировать объект делайте subject.next(newMyObj)
т.е. условно у меня есть
@input value;
нужно сделать
of(value).subscribe()
Size: a a a
ГЩ
@input value;
нужно сделать
of(value).subscribe()
OS
@input value;
нужно сделать
of(value).subscribe()
НЕ
AY
ГЩ
С
С
Р
G
MP
h
OS
h
D
return this.http.post<ContactForm>(
this.backendService.remoteUrl(`contact_us`),
this.backendService.jsonBuilder('contact_us', contactForm)).pipe(
catchError(err => {
return this.backendService.handleError(err);
})
);
const spy = spyOn(spectator.get(BackendService),'openSnackBar');
spectator.service.sendContactFormRequest({email: 'email'}).subscribe();
httpSpectator.expectOne(spectator.get(BackendService).remoteUrl(`contact_us`), HttpMethod.POST).flush(new Error('Contact Error'), {someErrorResponseForChat});
expect(spy).toHaveBeenCalled();
An error was thrown in afterAll
HttpErrorResponse: Http failure response for http://localhost:3000/api/v1/contact_us.json: 404 Contact not found
S
return this.http.post<ContactForm>(
this.backendService.remoteUrl(`contact_us`),
this.backendService.jsonBuilder('contact_us', contactForm)).pipe(
catchError(err => {
return this.backendService.handleError(err);
})
);
const spy = spyOn(spectator.get(BackendService),'openSnackBar');
spectator.service.sendContactFormRequest({email: 'email'}).subscribe();
httpSpectator.expectOne(spectator.get(BackendService).remoteUrl(`contact_us`), HttpMethod.POST).flush(new Error('Contact Error'), {someErrorResponseForChat});
expect(spy).toHaveBeenCalled();
An error was thrown in afterAll
HttpErrorResponse: Http failure response for http://localhost:3000/api/v1/contact_us.json: 404 Contact not found
this.backendService.handleError
D
S
S