You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eg, I have a repository that has fetch methods that do not return data themselves but via stream getters. Firstly I don't want to test via widgets but test the repository directly, secondly I am unsure how to handle the streams. The easy part is replacing the service api the repository uses with a mocked one, but after that I'm on my own (I'm sure I can work it out but example code would make things so much easier).
Also example tests using the notifiers would be great.
(I can see a couple of previous question related to this, but here I am just suggesting expanding the testing docs.)
Also Mockito and Mocktail samples would be fantastic.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
May I suggest expanding the testing docs at https://riverpod.dev/docs/cookbooks/testing/ to cover more cases.
Eg, I have a repository that has fetch methods that do not return data themselves but via stream getters. Firstly I don't want to test via widgets but test the repository directly, secondly I am unsure how to handle the streams. The easy part is replacing the service api the repository uses with a mocked one, but after that I'm on my own (I'm sure I can work it out but example code would make things so much easier).
Also example tests using the notifiers would be great.
(I can see a couple of previous question related to this, but here I am just suggesting expanding the testing docs.)
Also Mockito and Mocktail samples would be fantastic.
Beta Was this translation helpful? Give feedback.
All reactions