Skip to content

Commit

Permalink
chore: fix sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ercultimate committed May 11, 2023
1 parent c78b1fc commit 866ca82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions feature-libs/cart/base/core/cart-persistence.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ export function cartStatePersistenceFactory(
cartStatePersistenceService: MultiCartStatePersistenceService,
configInit: ConfigInitializerService
): () => Promise<Config> {
const result = () =>
return () =>
lastValueFrom(
configInit.getStable('context').pipe(
tap(() => {
cartStatePersistenceService.initSync();
})
)
);
return result;
}

/**
Expand Down
3 changes: 1 addition & 2 deletions integration-libs/cdc/root/cdc-root.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ export function cdcJsFactory(
cdcJsService: CdcJsService,
configInit: ConfigInitializerService
): () => Promise<Config> {
const func = () =>
return () =>
lastValueFrom(
configInit.getStable('context', 'cdc').pipe(
tap(() => {
cdcJsService.initialize();
})
)
);
return func;
}

export function defaultCdcComponentsConfig(): CmsConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ describe('CDCUpdatePasswordComponentService', () => {
beforeEach(() => {
cdcJsService.updateUserPasswordWithoutScreenSet =
createSpy().and.returnValue(
throwError({ status: 'ERROR', errorDetails: 'Error occured' })
throwError(() => ({
status: 'ERROR',
errorDetails: 'Error occured',
}))
);
TestBed.compileComponents();
});
Expand Down

0 comments on commit 866ca82

Please sign in to comment.