0

I am using Jest version 28.1.0 and Angular version 12.2.17. I want to mock below code but unable to do it. Please guide me how can I mock @ViewChild.

@ViewChild(ChildComponent) childComponent!: ChildComponent;

apply(): void {
 this.childComponent.apply();
}
Anna
  • 1,669
  • 7
  • 38
  • 63

0 Answers0