]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/blob
cd8b3a243ee417d761da4fcba3655019834e8d51
[ceph-ci.git] /
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';
6
7 describe('FormlyFileTypeComponent', () => {
8   let component: FormlyFileTypeComponent;
9   let fixture: ComponentFixture<FormlyFileTypeComponent>;
10
11   beforeEach(async () => {
12     await TestBed.configureTestingModule({
13       imports: [FormlyModule.forRoot()],
14       declarations: [FormlyFileTypeComponent]
15     }).compileComponents();
16   });
17
18   beforeEach(() => {
19     fixture = TestBed.createComponent(FormlyFileTypeComponent);
20     component = fixture.componentInstance;
21
22     const formControl = new FormControl();
23     const field = {
24       key: 'file',
25       type: 'file',
26       templateOptions: {},
27       get formControl() {
28         return formControl;
29       }
30     };
31
32     component.field = field;
33
34     fixture.detectChanges();
35   });
36
37   it('should create', () => {
38     expect(component).toBeTruthy();
39   });
40 });