Testing commands run from view model initializer lists #5
Unanswered
ac-zmcnulty
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A few weeks ago, I read up on the Flutter architecture docs, which promote MVVM and use of the command pattern. I've adopted both of those things, as well as command_it along the way (great library, so thank you!!).
I'm a bit confounded when it comes to testing, though.
Again, per the Flutter docs, I've adopted a pattern of running screen loading commands from my view model initializer lists. For example:
I'd like to test whether the
loadcommand runs upon initializing the view model. Is this possible, or should I simply callrunAsyncon the load command (per the testing docs) and validate it produces the expected results?Beta Was this translation helpful? Give feedback.
All reactions