Ok, something's weird with the `composeTestRule`. ...
# compose
r
Ok, something's weird with the
composeTestRule
. This code:
Copy code
kotlin
fun BugTesting() {
    Log.d("Testing", "Testing")
    val someVar by produceState(1) {
        delay(100)
        value = 2
        Log.d("Testing", "Set value to $value")
        delay(100)
        value = 3
        Log.d("Testing", "Set value to $value")
        delay(100)
        value = 4
        Log.d("Testing", "Set value to $value")
        delay(100)
        value = 5
        Log.d("Testing", "Set value to $value")
    }
    Log.d("Testing", "Var: $someVar")
    Column {
        Text("Var: $someVar", color = Color.Red)
    }
}
Only shows
Copy code
Testing
Var: 1
Nothing more. I initially assumed it'd be an issue with robolectric (https://github.com/robolectric/robolectric/issues/8368), but running it on android hardware, I'm getting a similar behavior. outside of test context, the code runs fine.
🧵 4