kotest-assertions-core / io.kotest.matchers.string / kotlin.String / shouldBeFalsy

shouldBeFalsy

fun String?.shouldBeFalsy(): Unit

Assert that string should be falsy.

Verifies that string is equal to one of the values: false,no,n,0. Assert is not case sensitive.

"0".shouldBeFalsy()     // Assertion passes
"No".shouldBeFalsy()    // Assertion passes
"n".shouldBeFalsy()     // Assertion passes

"yes".shouldBeFalsy()   // Assertion fails