I am using Angular with Jest to mock a class. I am finding difficulty in mocking the constructor as the test function is invoked within the constructor. Any input on how to mock the constructor with jest would be helpful
export class AppComponent {
constructor(){
this.test();
}
test(){
return 'Test'
}
}
test
describe( 'AppComponent', () => {
let fixture: WorkerFormComponent;
beforeEach( () => {
fixture = new AppComponent(
);
});