{"repo":"jfairbank/redux-saga-test-plan","free":true,"listed":false,"github":"https://github.com/jfairbank/redux-saga-test-plan","clone":"git clone https://github.com/jfairbank/redux-saga-test-plan.git","description":"Test Redux Saga with an easy plan.","language":"JavaScript","stars":1243,"topics":["redux-saga","testing-sagas","testing","redux-saga-testing","unit-testing","integration-testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"Redux Saga Test Plan Test Redux Saga with an easy plan. Redux Saga Test Plan makes testing sagas a breeze. Whether you need to test exact effects and their ordering or just test your saga put 's a specific action at some point, Redux Saga Test Plan has you covered. Redux Saga Test Plan aims to embrace both integration testing and unit testing approaches to make testing your sagas easy. Table of Contents Integration Testing Simple Example Mocking with Providers Example with Reducer Unit Testing Extending inspect options Install Documentation Introduction Getting Started Integration Testing Unit Testing Integration Testing Requires global Promise to be available One downside to unit testing sagas is that it couples your test to your implementation. Simple reordering of yielded effects in your saga could break your tests even if the functionality stays the same. If you're not concerned with the order or exact effects your saga yields, then you can take an integrative approach, testing the behavior of your saga when run by Redux Saga. Then, you can simply test that a particular effect was yielded during the saga run. For this, use the expectSaga test function. Simple Example Import the expectSaga function and pass in your saga function as an argument. Any additional arguments to expectSaga will become arguments to the saga function. The return value is a chainable API with assertions for the different effect creators available in Redux Saga. In the example below, we test that the","default_branch":null,"files":null,"tree":[],"storefront":"/r/jfairbank","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jfairbank/redux-saga-test-plan/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}