-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
In this post, I will present some practical approaches to test an application that uses thunks from the redux-thunk library.
The above example checks the actions executed by someThunkFunction. The mockStore function used in the example comes from the redux-mock-store library.
Check out a repository with described example.
In this post, I will focus on testing async thunk action. We skip testing actions and action-creators because they should not contain anything worth testing (the example presented at the end of the post is based on the Redux Toolkit, which manages them itself). Single actions and selectors should be trivial.