I have a component which is meant to be used in an Angular Material MdDialog :
@Component({ ... }) export class MyComponent { constructor(@Inject(MD_DIALOG_
try this
beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ SharedTestingModule, ], declarations: [ MyComponent, ], providers: [ <-- here { provide: MdDialogData, useValue: {}, } ] <-- to here }) .compileComponents(); }));
let me know how it goes