Example.ts
export class Example{
public async initService(Id): Promise<any> {
//promise logic
}
}
Example.spec.ts
//imported Example class correctly
describe('testing', async () =>{
it('InitService test call', async ()=>{
let x = await Example.initService(id:any) //this line displays error as initService does not exist on type 'typeof AnnounceService'
});
});
I have imported the class Example correctly but then too unable to call the function of Example class in the Example.spec.ts.