Kotlin Bob times out in editor, fails tests uploaded, passes locally

Running the solution in the web editor it says `Your tests timed out. "
Submitting via CLI it says “In order for our systems to analyze your code, the tests must be passing.”
Running locally, all tests pass.

object Bob {
    private val answers =
            listOf("Whatever.", "Sure.", "Whoa, chill out!", "Calm down, I know what I'm doing!")

    fun hey(input: String): String {
        val msg = input.trim()
        if (msg.isEmpty()) return "Fine. Be that way!"
        val isQuestion = if (msg.endsWith('?')) 1 else 0
        val isYelling = if (msg.any { it.isUpperCase() } && !msg.any { it.isLowerCase() }) 2 else 0
        return answers[isQuestion + isYelling]
    }
}

It passed in the editor after trying a few hours later. Thanks!