Skip to content

Commit

Permalink
Fix testing
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Jan 9, 2024
1 parent e7e3a80 commit 9047d88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions projects/ccf-eui/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ describe('AppComponent', () => {
config$: new Observable<Immutable<unknown>>(),
patchConfig: () => undefined,
getOption: () => of(undefined),
patchState: () => undefined
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { SceneState } from '../../../core/store/scene/scene.state';

import { SpatialSearchConfigBehaviorComponent } from './spatial-search-config-behavior.component';
import { SpatialSearchConfigBehaviorModule } from './spatial-search-config-behavior.module';
import { GlobalConfigState } from 'ccf-shared';

function wait(duration: number): Promise<void> {
return new Promise(resolve => {
Expand All @@ -27,7 +28,8 @@ describe('SpatialSearchConfigBehaviorComponent', () => {
shallow = new Shallow(SpatialSearchConfigBehaviorComponent, SpatialSearchConfigBehaviorModule)
.mock(MatDialogRef, { close(): void { /* Empty */ } })
.mock(SceneState, { referenceOrgans$: of([]) })
.mock(HttpClient, http);
.mock(HttpClient, http)
.mock(GlobalConfigState, { getOption: () => of(undefined) });
});

it('should close the dialog when the close() method is called', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { Shallow } from 'shallow-render';

import { SpatialSearchUiBehaviorComponent } from './spatial-search-ui-behavior.component';
import { SpatialSearchUiBehaviorModule } from './spatial-search-ui-behavior.module';
import { of } from 'rxjs/internal/observable/of';
import { GlobalConfigState } from 'ccf-shared';

function wait(duration: number): Promise<void> {
return new Promise(resolve => {
Expand All @@ -21,7 +23,8 @@ describe('SpatialSearchUiBehaviorComponent', () => {
});

shallow = new Shallow(SpatialSearchUiBehaviorComponent, SpatialSearchUiBehaviorModule)
.mock(MatDialogRef, { close(): void { /* Empty */ } });
.mock(MatDialogRef, { close(): void { /* Empty */ } })
.mock(GlobalConfigState, { getOption: () => of(undefined) });
});

it('should close the dialog when the close() method is called', async () => {
Expand Down

0 comments on commit 9047d88

Please sign in to comment.