kotest-assertions-core / io.kotest.matchers.string / beFalsy

beFalsy

fun beFalsy(): Matcher<String?>

Matcher checks that string is falsy.

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

"0" should beFalsy()     // Assertion passes
"No" should beFalsy()    // Assertion passes
"n" should beFalsy()     // Assertion passes

"yes" should beFalsy()   // Assertion fails
"no" shouldNot beFalsy() // Assertion fails