Skip to content

RTK Query: Unit testing shared features #2125

Answered by phryneas
mattduggan asked this question in Q&A
Discussion options

You must be logged in to vote

You can snapshot a store that has all the data you want using the Redux devtools and then use a hydration action together with extractRehydrationInfo to get that data into the store in your test.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mattduggan
Comment options

You must be logged in to vote
1 reply
@phryneas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants