If you must use the label for the formControl
. Like the Ant Design Checkbox. It may throw this error while running tests. You can use ngDefaultControl
<label nz-checkbox formControlName="isEnabled" ngDefaultControl>
Hello
</label>
<nz-switch nzSize="small" formControlName="mandatory" ngDefaultControl></nz-switch>