]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; |
2 | import { FormControl } from '@angular/forms'; | |
3 | import { FormlyModule } from '@ngx-formly/core'; | |
4 | ||
5 | import { FormlyFileTypeComponent } from './formly-file-type.component'; | |
aee94f69 | 6 | import { configureTestBed } from '~/testing/unit-test-helper'; |
1e59de90 TL |
7 | |
8 | describe('FormlyFileTypeComponent', () => { | |
9 | let component: FormlyFileTypeComponent; | |
10 | let fixture: ComponentFixture<FormlyFileTypeComponent>; | |
11 | ||
aee94f69 TL |
12 | configureTestBed({ |
13 | imports: [FormlyModule.forRoot()], | |
14 | declarations: [FormlyFileTypeComponent] | |
1e59de90 TL |
15 | }); |
16 | ||
17 | beforeEach(() => { | |
18 | fixture = TestBed.createComponent(FormlyFileTypeComponent); | |
19 | component = fixture.componentInstance; | |
20 | ||
21 | const formControl = new FormControl(); | |
22 | const field = { | |
23 | key: 'file', | |
24 | type: 'file', | |
25 | templateOptions: {}, | |
26 | get formControl() { | |
27 | return formControl; | |
28 | } | |
29 | }; | |
30 | ||
31 | component.field = field; | |
32 | ||
33 | fixture.detectChanges(); | |
34 | }); | |
35 | ||
36 | it('should create', () => { | |
37 | expect(component).toBeTruthy(); | |
38 | }); | |
39 | }); |