jestjs
-
-
消息“在 jest.setTimeout 指定的 5000 毫秒超时内未调用异步回调” 我正在使用Puppeteer和Jest来运行一些前端测试。 我的测试如下所示: 这很奇怪,因为: 我指定超时为30000 我是否得到这个错误似乎非常随机 为什么会发生这种情况?
-
如何使用 Jest 模拟 ES6 模块导入? 我想测试我的一个,这超级容易—— 应用程序代码: 对于奖励积分,当里面的函数是默认导出时,我很乐意让整个事情工作。但是,我知道监视默认导出在Jasmine中不起作用(或者至少我永远无
-
How to test the type of a thrown exception in Jest I'm working with some code where I need to test the type of an exception thrown by a function (is it TypeError, ReferenceError, etc.?). My current testing framework is AVA and I can test it as a second argument method, like here: I started rewriting my t
标签