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

Function expectStatusChangeEvent

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected