Jest spy on any function
Sat 05 Oct 2019
You can use:
component.property = jest.fn();
component.property();
expect(component.property).toHaveBeenCalled();Sat 05 Oct 2019
You can use:
component.property = jest.fn();
component.property();
expect(component.property).toHaveBeenCalled();