android-components / mozilla.components.support.android.test / androidx.lifecycle.LiveData

Extensions for androidx.lifecycle.LiveData

Name Summary
awaitValue fun <T> LiveData<T>.awaitValue(timeout: Long = 1, unit: TimeUnit = TimeUnit.SECONDS): T?
Subscribes to the LiveData object and blocks until a value was observed. Returns the value or throws InterruptedException if no value was observed in the given timeout (using unit).