当我运行jest时,这个错误失败了:({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export type Customer =^^^^^^
at transformAndBuildScript (node_modules/jest-runtime
我正在测试使用Jest和酶的反应组件,并且很难测试是否正确地调用了已删除的函数(或者根本没有调用)。click for debounced function </div> }我认为,已取消的函数测试应该与未取消的测试非常相似,但是应该使用setTimeout或Promise (在.then或.finally中使用expect断言)。在尝试了使用这两种想法的多种测试之后,我不