Add tests to the repo
tkrotoff opened this issue · 1 comments
tkrotoff commented
Something like:
src/features/issuesList/IssuesList.tsx
src/features/issuesList/IssuesList.test.tsx
src/features/issuesList/IssuesListPage.tsx
src/features/issuesList/IssuesListPage.test.tsx
src/features/issuesList/issuesSlice.ts
src/features/issuesList/issuesSlice.test.ts
...
The most interesting is demonstrate how to test and mock specific RTK features like createSlice, createEntityAdapter...
markerikson commented
Appreciate the suggestion, but I'm not looking to add tests at the moment, for a few reasons:
- We're already looking at rewriting the tutorial sequence
- The way I have the repo and tutorials set up makes it hard to add more content due to the use of specific commit links in the history
- There's actually really nothing special about testing Redux logic that uses RTK. You still test reducer functions the same way, there's no real need to test generated action creators, and we already have a bunch of tests that prove that
createEntityAdapter
does what it's supposed to.