I am trying to unit test resetform() function [used as TemplateVar.resetForm()] where loginVar is used as template variable for template driven form in angular. I am not getting any sources oridea ho to do that. Please guide. Thanks in advance!
component.html
<form #loginVar="ngForm">
```code form fields```
</form>
<button mat-raised-button color="primary" (click)="onReset(loginVar)">Reset</button>
component.ts
onReset(e) {
e.resetForm();
}