Hi, I have converted a project from redux-saga to typed-redux-saga. When running existing tests using Jest and redux-saga-test-plan I encounter this error:
TypeError: yield* (intermediate value) is not iterable
The error was not present before when we were using yield() instead of yield*()syntax.
I'm using the macro, and if I've understood the docs correctly, it should transpile to use the original yield() syntax instead of yield*() - but it's not doing that in the tests.
I have set up the project to use the macro
by running yarn add typed-redux-saga and have set up the .babelrc file like this:
.babelrc
{
"plugins": ["macros"]
}
All saga imports use the macro: import { put, select, takeLatest } from 'typed-redux-saga/macro'
Hi, I have converted a project from redux-saga to typed-redux-saga. When running existing tests using Jest and redux-saga-test-plan I encounter this error:
TypeError: yield* (intermediate value) is not iterable
The error was not present before when we were using
yield()
instead ofyield*()
syntax.I'm using the macro, and if I've understood the docs correctly, it should transpile to use the original
yield()
syntax instead ofyield*()
- but it's not doing that in the tests.I have set up the project to use the macro by running
yarn add typed-redux-saga
and have set up the .babelrc file like this: .babelrcAll saga imports use the macro:
import { put, select, takeLatest } from 'typed-redux-saga/macro'
My jest.config.js file uses:
Which is the fix suggested here.