<Instrumented Test throws AssertionError but succe...
# stackoverflow
u
Instrumented Test throws AssertionError but succeeds anyways I have the following simple instrumented ViewModel test: @RunWith(AndroidJUnit4::class) class LoginViewModelInstrumentedTest { @Test fun loginViewModel_getOrAwait_success() { val loginViewModel = get(LoginViewModel::class.java) GlobalScope.launch(Dispatchers.Main) { val result = loginViewModel.wasLoginSuccessful.getOrAwaitValue() assertTrue(result) } } } getOrAwaitValue definition: @VisibleForTesting(otherwise =...