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 { FormlyTextareaTypeComponent } from './formly-textarea-type.component';
9 template: ` <form [formGroup]="form">
10 <formly-form [model]="{}" [fields]="fields" [options]="{}" [form]="form"></formly-form>
13 class MockFormComponent {
15 form = new FormGroup({});
16 fields: FormlyFieldConfig[] = [
23 describe('FormlyTextareaTypeComponent', () => {
24 let component: MockFormComponent;
25 let fixture: ComponentFixture<MockFormComponent>;
27 beforeEach(async () => {
28 await TestBed.configureTestingModule({
29 declarations: [FormlyTextareaTypeComponent],
31 FormlyModule.forRoot({
32 types: [{ name: 'input', component: FormlyTextareaTypeComponent }]
35 }).compileComponents();
39 fixture = TestBed.createComponent(MockFormComponent);
40 component = fixture.componentInstance;
41 fixture.detectChanges();
44 it('should create', () => {
45 expect(component).toBeTruthy();