| 17 | describe('SignalFormControl (web)', () => { |
| 18 | it('binds to formField directive', () => { |
| 19 | @Component({ |
| 20 | imports: [ReactiveFormsModule, FormField], |
| 21 | template: `<input [formField]="signalControl.fieldTree" />`, |
| 22 | }) |
| 23 | class TestCmp { |
| 24 | readonly signalControl = new SignalFormControl('initial', undefined, { |
| 25 | injector: inject(Injector), |
| 26 | }); |
| 27 | readonly control = this.signalControl as unknown as FormControl; |
| 28 | } |
| 29 | |
| 30 | const fixture = act(() => TestBed.createComponent(TestCmp)); |
| 31 | const input: HTMLInputElement = fixture.nativeElement.querySelector('input'); |