Skip to content
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

[Angular] Fix deprecated RxJS method (throwError) #26336

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('ActivateComponent', () => {
it('should set set error to true upon activation failure', inject(
[ActivateService],
fakeAsync((service: ActivateService) => {
jest.spyOn(service, 'get').mockReturnValue(throwError('ERROR'));
jest.spyOn(service, 'get').mockReturnValue(throwError(() => {}));

comp.ngOnInit();
tick();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('PasswordResetFinishComponent', () => {
it('should notify of generic error', inject(
[PasswordResetFinishService],
fakeAsync((service: PasswordResetFinishService) => {
jest.spyOn(service, 'save').mockReturnValue(throwError('ERROR'));
jest.spyOn(service, 'save').mockReturnValue(throwError(() => {}));
comp.passwordForm.patchValue({
newPassword: 'password',
confirmPassword: 'password',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('PasswordComponent', () => {

it('should notify of error if change password fails', () => {
// GIVEN
jest.spyOn(service, 'save').mockReturnValue(throwError('ERROR'));
jest.spyOn(service, 'save').mockReturnValue(throwError(() => {}));
comp.passwordForm.patchValue({
newPassword: 'myPassword',
confirmPassword: 'myPassword',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe('SettingsComponent', () => {

it('should notify of error upon failed save', () => {
// GIVEN
mockAccountService.save = jest.fn(() => throwError('ERROR'));
mockAccountService.save = jest.fn(() => throwError(() => {}));

// WHEN
comp.ngOnInit();
Expand Down
Loading