');
mockReaddirSync.mockReturnValue(mockDirListing); TypeScript将显示以下错误: Argument of type 'string[]' isType 'string' is not assignable to type 'Dirent'.ts(2345) 模拟实例的类型为 jest.SpyInstance<fs.Dirent[], [fs.PathLike: stri
我用的是角7和Jest。当我使用--codecoverage运行jest时,我的所有测试都通过了,但是构造函数中的许多分支没有被覆盖(类似于:)。在完成之后,我的所有测试套件都无法运行以下消息: ● Test suite failed to run TypeScript我在这里复制了package.json中的一些依赖项: