function* mySaga() {
const [customers, products] = yield all([
call(fetchCustomers),
call(fetchProducts)
])
}
我想开玩笑地测试所有效果,但我得到: Invalid attempt to destructure non-iterable instance
我的代码是:
const generator = mySaga()
expect(generator.next().value).toEqual(all([
call(fetchCustomers),
call(fetchProducts)
]))