Software Engineer using JavaScript. Learning Flutter, Node, MongoDB and GraphQL. Addicted to TV shows, especially nordic. From π§π·, living in πΈπͺ.
Good point in avoiding logic on tests, thanks for contributing!
Are you referring to Mockito's verify function? If so, does it apply here as I'm dealing with a callback function? I have only used Mockito when testing abstract classes so far.
It actually does, I wrote a post on how to do that. There is a lot of missing information around testing with flutter right now and we are busy with a larger scale, long term white-label product and realized we have learnt a lot with little help from google.
The only thing I have not worked out yet is how to test the pull to refresh.
The shirt is, pop your callback function into a mock class, then pass that into your widget. You can then verify that.
Software Engineer using JavaScript. Learning Flutter, Node, MongoDB and GraphQL. Addicted to TV shows, especially nordic. From π§π·, living in πΈπͺ.
Good point in avoiding logic on tests, thanks for contributing!
Are you referring to Mockito's verify function? If so, does it apply here as I'm dealing with a callback function? I have only used Mockito when testing abstract classes so far.
It actually does, I wrote a post on how to do that. There is a lot of missing information around testing with flutter right now and we are busy with a larger scale, long term white-label product and realized we have learnt a lot with little help from google.
The only thing I have not worked out yet is how to test the pull to refresh.
The shirt is, pop your callback function into a mock class, then pass that into your widget. You can then verify that.
Cool! I'll check it out. Thanks :)