在运行特定文件中的任何测试之前,我正在尝试运行一些异步函数。user = await new User(userObj).save(); // This is a mongoose document ...每当我在beforeAll函数中有什么内容时,我都会得到一个错误:
超时-异步回调没有在jest.setTimeout.Error指定的5000 ms超时内调用:超时-异
我正在尝试为我的一个函数编写一个使用Jest的单元测试用例,但不确定它是否正确。it('should return Dummy Data when called successfully', () => {
jest.spyOn(httpService, 'get').mockImplementation(() => o