how to test promise returning functions
问题 I have following async function that return Promise. static getAccessToken(env: DeploymentEnv, username: string, password: string): Promise<AccessToken>; Now, this the unit test that I wrote for it. it("should be able to get access token",async ()=>{ let accessToken = await IModelHubServiceBusClient.getAccessToken('QA', 'abc@xyz.com', 'abc')!; assert.exists(accessToken); }); When run it, it fails the test saying the following error: should be able to get access token: Error: Timeout of 2000ms