MCPcopy Create free account
hub / github.com/angular/angular / TestCmp

Class TestCmp

packages/forms/signals/test/web/signal_form_control_web.spec.ts:19–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17describe('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');

Callers

nothing calls this directly

Calls 5

ComponentInterface · 0.90
injectFunction · 0.90
signalFunction · 0.90
disabledFunction · 0.90
valueFunction · 0.85

Tested by

no test coverage detected