1 import { Component } from '@angular/core';
2 import { ComponentFixture, TestBed } from '@angular/core/testing';
3 import { FormGroup } from '@angular/forms';
4 import { FormlyFieldConfig, FormlyModule } from '@ngx-formly/core';
6 import { FormlyArrayTypeComponent } from './formly-array-type.component';
9 template: ` <form [formGroup]="form">
10 <formly-form [model]="{}" [fields]="fields" [options]="{}" [form]="form"></formly-form>
13 class MockFormComponent {
14 form = new FormGroup({});
15 fields: FormlyFieldConfig[] = [
22 describe('FormlyArrayTypeComponent', () => {
23 let component: MockFormComponent;
24 let fixture: ComponentFixture<MockFormComponent>;
26 beforeEach(async () => {
27 await TestBed.configureTestingModule({
28 declarations: [FormlyArrayTypeComponent],
30 FormlyModule.forRoot({
31 types: [{ name: 'array', component: FormlyArrayTypeComponent }]
34 }).compileComponents();
38 fixture = TestBed.createComponent(MockFormComponent);
39 component = fixture.componentInstance;
40 fixture.detectChanges();
43 it('should create', () => {
44 expect(component).toBeTruthy();