MCPcopy
hub / github.com/angular/angular / expectStatusChangeEvent

Function expectStatusChangeEvent

packages/forms/test/reactive_integration_spec.ts:1188–1197  ·  view source on GitHub ↗
(
      event: ControlEvent<T> | undefined,
      status: FormControlStatus,
      sourceControl: AbstractControl,
    )

Source from the content-addressed store, hash-verified

1186 }
1187
1188 function expectStatusChangeEvent<T>(
1189 event: ControlEvent<T> | undefined,
1190 status: FormControlStatus,
1191 sourceControl: AbstractControl,
1192 ) {
1193 const touchedEvent = event as StatusChangeEvent;
1194 expect(touchedEvent).toBeInstanceOf(StatusChangeEvent);
1195 expect(touchedEvent.source).toBe(sourceControl);
1196 expect(touchedEvent.status).toBe(status);
1197 }
1198
1199 it('Single level Control should emit changes for itself', () => {
1200 const fc = new FormControl<string | null>('foo', Validators.required);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…