componentWillMount() { CrudActions.getUsers();如何使用jest调用我的reducer?我想为行为编写测试,而不是在CrudActions中调用另一个setAll函数。到目前为止,我只能调用componentWillMount
test('calls `componentWillMount` before r
我试图在我的Vue组件上编写一个简单的Jest单元测试。Jest模拟依赖模块时,我一直在观察一些奇怪的行为。名为should mock in component的测试没有获得eventBus的模拟值,而是undefined。如果我在测试中尝试和console.log(eventBus);,它也是undefined,我只是不明白。
我期望发生的是替换组件中的eventBus实例。我意