import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { WptDialogRef, WPT_DIALOG_DATA } from '@arrow/warpaint/dialog'; import { PromptComponent } from './prompt.component'; function provideDialogData() { return { style: 'some style', buttons: [ { confirm: {} } ] }; } describe('PromptComponent', () => { let component: PromptComponent; let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ schemas: [NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA], declarations: [PromptComponent], providers: [ { provide: WptDialogRef, useValue: {} }, { provide: WPT_DIALOG_DATA, useFactory: provideDialogData } ] }).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(PromptComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });