Skip to content

Commit

Permalink
NAS-128920: Update setup-jest.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
RehanY147 committed Jul 9, 2024
1 parent 5020ba1 commit 9272480
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/setup-jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
import failOnConsole from 'jest-fail-on-console';
import { MockProvider } from 'ng-mocks';
import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler';
import { Observable, throwError } from 'rxjs';
import { Observable } from 'rxjs';
import { IcuMissingTranslationHandler } from 'app/core/classes/icu-missing-translation-handler';
import { CommonDirectivesModule } from 'app/directives/common/common-directives.module';
import { WINDOW } from 'app/helpers/window.helper';
Expand All @@ -41,7 +41,6 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service';
import { SnackbarModule } from 'app/modules/snackbar/snackbar.module';
import { TestIdModule } from 'app/modules/test-id/test-id.module';
import { ErrorHandlerService } from 'app/services/error-handler.service';
import { WebSocketService } from 'app/services/ws.service';

failOnConsole();

Expand Down Expand Up @@ -114,17 +113,17 @@ defineGlobalsInjections({
mockProvider(ErrorHandlerService, {
catchError: () => (source$: Observable<unknown>) => source$,
}),
{
provide: WebSocketService,
useClass: class {
call(): Observable<unknown> {
return throwError(() => new Error('WebsocketService injection not provided'));
}
job(): Observable<unknown> {
return throwError(() => new Error('WebsocketService injection not provided'));
}
},
},
// {
// provide: WebSocketService,
// useClass: class {
// call(): Observable<unknown> {
// return throwError(() => new Error('WebsocketService injection not provided'));
// }
// job(): Observable<unknown> {
// return throwError(() => new Error('WebsocketService injection not provided'));
// }
// },
// },
],
});

Expand Down

0 comments on commit 9272480

Please sign in to comment.