I am trying to write a unit test case to clear the checked values of radio button
By clicking the delete icon link it should clear the values
HTML file
<mat-icon class="remove-icon" (click)="resetradioValues('gender')">delete</mat-icon>
ts file
resetradioValues(name: string){
this.form.get(name).patchValue(null);
}
I have written a unit test case for the above code but it is not working for me
it('should clear radio button values', () => {
const param = Object.assign({},radio, { name: 'test' });
console.log(param);
component.resetradioValues(param.name);
});
Please let me know anybody can solve this issue