Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

282
Views
`TypeError: env.getState` error when testing whole redux saga with selector using jest

I have a problem with testing whole saga. Tests are working correctly when there is no yield selector usage in the saga, but when I have any selector in saga then I get error TypeError: env.getState is not a function.

I created repo with an example. Code is only for showing what the problem is. Instructions how to run project is in the README

https://github.com/gunitguy/react-app-test

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found solution. runSaga takes also getState function which return mocked state. redux-saga.js.org/docs/advanced/Testing/#testing-the-full-saga

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!