Skip to content

Commit

Permalink
fixed test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Jun 4, 2024
1 parent e605097 commit eb5ada3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/app/users/user-settings/user-settings.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from "@angular/core/testing";
import { ReactiveFormsModule } from "@angular/forms";
import { Store, StoreModule } from "@ngrx/store";
import { MockConfigService, MockStore } from "shared/MockStubs";
import { ConfigService } from "shared/services";
import { MockStore } from "shared/MockStubs";
import { AppConfigService } from "app-config.service";

import { UserSettingsComponent } from "./user-settings.component";
import { SharedScicatFrontendModule } from "shared/shared.module";
Expand All @@ -25,6 +25,8 @@ describe("UserSettingsComponent", () => {
let store: MockStore;
let dispatchSpy;

const getConfig = () => ({});

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
schemas: [NO_ERRORS_SCHEMA],
Expand All @@ -40,10 +42,7 @@ describe("UserSettingsComponent", () => {
});
TestBed.overrideComponent(UserSettingsComponent, {
set: {
providers: [
// needed for config form sub component
{ provide: ConfigService, useClass: MockConfigService },
],
providers: [{ provide: AppConfigService, useValue: { getConfig } }],
},
});
TestBed.compileComponents();
Expand Down

0 comments on commit eb5ada3

Please sign in to comment.