Skip to content

Commit

Permalink
feat: remove dead code in tests(#102332)
Browse files Browse the repository at this point in the history
  • Loading branch information
skoch-intershop committed Dec 13, 2024
1 parent 7a1b908 commit 89c2594
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/
import { TestBed } from '@angular/core/testing';
import { Action, Store } from '@ngrx/store';
import { MockStore, provideMockStore } from '@ngrx/store/testing';
import { UrlHelperService } from 'angular-oauth2-oidc';
import { BehaviorSubject, noop } from 'rxjs';
import { anything, capture, instance, mock, spy, verify, when } from 'ts-mockito';

Expand All @@ -18,7 +17,6 @@ import {
getRestEndpoint,
getSparqueConfig,
} from 'ish-core/store/core/configuration';
import { CoreStoreModule } from 'ish-core/store/core/core-store.module';
import { serverError } from 'ish-core/store/core/error';
import { isServerConfigurationLoaded } from 'ish-core/store/core/server-config';
import { getPGID } from 'ish-core/store/customer/user';
Expand Down Expand Up @@ -234,15 +232,13 @@ describe('Sparque Api Service', () => {
let httpTestingController: HttpTestingController;
const apiTokenServiceMock = mock(ApiTokenService);
const tokenServiceMock = mock(TokenService);
const urlHelperServiceMock = mock(UrlHelperService);

beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [
{ provide: ApiTokenService, useFactory: () => instance(apiTokenServiceMock) },
{ provide: TokenService, useFactory: () => instance(tokenServiceMock) },
{ provide: UrlHelperService, useFactory: () => instance(urlHelperServiceMock) },
provideMockStore({
selectors: [
{ selector: isServerConfigurationLoaded, value: true },
Expand Down Expand Up @@ -293,7 +289,7 @@ describe('Sparque Api Service', () => {
beforeEach(() => {
TestBed.configureTestingModule({
// https://angular.io/guide/http#testing-http-requests
imports: [CoreStoreModule.forTesting(['configuration', 'serverConfig']), HttpClientTestingModule],
imports: [HttpClientTestingModule],
providers: [
{ provide: ApiTokenService, useFactory: () => instance(apiTokenServiceMock) },
{ provide: TokenService, useFactory: () => instance(mock(TokenService)) },
Expand Down

0 comments on commit 89c2594

Please sign in to comment.