runUntilSettled

suspend fun TestScope.runUntilSettled(timeout: Duration = 10.seconds, isSettled: () -> Boolean)(source)

Runs the test scheduler until isSettled holds, waiting in real time between passes.

Compose resources are loaded on an internal Dispatchers.Default scope, so state derived from a string resource lands outside the test scheduler and cannot be observed by draining it.

Not safe in a test that asserts on exact virtual time: waiting in real time suspends the test coroutine, and runTest advances the virtual clock to the next scheduled task whenever that happens, firing pending delays early. Such a test should instead load the resources it needs before scheduling anything it later advances past.