Skip to content

Commit

Permalink
added providers in tests for #SNRGY-2829
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahannes committed Aug 31, 2023
1 parent 4dc0bf9 commit f2d12ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/app/modules/info/dialogs/info/info.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialogRef } from '@angular/material/dialog';

import { InfoDialogComponent } from './info.component';

Expand All @@ -8,7 +9,10 @@ describe('InfoComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ InfoDialogComponent ]
declarations: [ InfoDialogComponent ],
providers: [
{provide: MatDialogRef, useValue: {}}
]
})
.compileComponents();

Expand Down
7 changes: 6 additions & 1 deletion src/app/modules/info/shared/info.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { TestBed } from '@angular/core/testing';
import { MatDialog } from '@angular/material/dialog';

import { InfoService } from './info.service';

describe('InfoService', () => {
let service: InfoService;

beforeEach(() => {
TestBed.configureTestingModule({});
TestBed.configureTestingModule({
providers: [
{provide: MatDialog, useValue: {}}
]
});
service = TestBed.inject(InfoService);
});

Expand Down

0 comments on commit f2d12ef

Please sign in to comment.