jfairbank / redux-saga-test-plan

Test Redux Saga with an easy plan.
http://redux-saga-test-plan.jeremyfairbank.com
MIT License
1.25k stars 127 forks source link

getting TypeError: (0 , _reduxSaga.stdChannel) is not a function on simple example #371

Open gaurav341 opened 3 years ago

gaurav341 commented 3 years ago

Logs are

TypeError: (0 , _reduxSaga.stdChannel) is not a function

at expectSaga (/Users/gaurav.singh/Documents/projects/my-project/node_modules/redux-saga-test-plan/lib/expectSaga/index.js:123:47)
at Object.<anonymous> (/Users/gaurav.singh/Documents/projects/my-project/src/redux/common/init/test/init.reducer.test.js:16:16)
at Object.asyncJestTest (/Users/gaurav.singh/Documents/projects/my-project/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)
at /Users/gaurav.singh/Documents/projects/my-project/node_modules/jest-jasmine2/build/queueRunner.js:43:12
at new Promise (<anonymous>)
at mapper (/Users/gaurav.singh/Documents/projects/my-project/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
at /Users/gaurav.singh/Documents/projects/my-project/node_modules/jest-jasmine2/build/queueRunner.js:73:41
at processTicksAndRejections (internal/process/task_queues.js:97:5)
ggbell commented 2 years ago

For anyone still facing this issue, this TypeError is thrown if you have an existing mock of redux-saga, e.g.

jest.mock('redux-saga', () => ...);

Try removing this and the error should disappear.