How to test API request failures with Redux Saga?

Posted by Jennifer | Updated on

Want to test API request failures with Redux Saga? To make yield get an arbitrary value, pass it to next(). To make it “receive” an error, pass it to throw().

Here is an example:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers