I'm using ng-recaptcha V2 in a reactive form and can't figure out how to write my unit tests for a component quite similar to doc sample for reactive forms : https://github.com/DethAriel/ng-recaptcha/#example-forms
How to mock reCaptcha to simulate user operation pending / reCaptcha failed / reCaptcha passed ?
I tried many different ways. The one that seams the most promising is skipping RecaptchaModule
and RecaptchaFormsModule
imports in test and creating a ReCaptchaComponentMock
component. But I can't get it working because of Error: No value accessor for form control with name: 'recaptcha'
("recaptcha" being the formControlName
value for my tag)