Why it needs tests: This file contains the core state machine of your application (handle_key_event transitions).
How to test it: Currently, App is heavily coupled with I/O (it instantiates Auth and CacheStore directly). To easily unit test the state transitions, you might want to either mock those dependencies or extract the pure state-transition logic out of the side-effect-heavy App struct.
Why it needs tests: This file contains the core state machine of your application (
handle_key_eventtransitions).How to test it: Currently,
Appis heavily coupled with I/O (it instantiatesAuthandCacheStoredirectly). To easily unit test the state transitions, you might want to either mock those dependencies or extract the pure state-transition logic out of the side-effect-heavyAppstruct.