Can someone provide a code example of how I should unit test my
that defines a
property? I found that
can be used to achieve this, has anyone used this strategy?
11 months ago
Is there a reason you're using mutableStateOf inside the view model? I would think that using a kotlin flow such as MutableStateFlow and then collecting as state would be more appropriate.Then for unit testing you can just test it by collecting it or use a library like https://github.com/cashapp/turbine