function* mySaga() {
const [customers, products] = yield all([
call(fetchCustomers),
call(fetchProducts)
])
}
I want to test all effect in jest but I get: Invalid attempt to destructure non-iterable instance
my code is:
const generator = mySaga()
expect(generator.next().value).toEqual(all([
call(fetchCustomers),
call(fetchProducts)
]))