assertk / assertk.assertions / none

none

(common, jvm) fun <E> Assert<Iterable<E>>.none(f: (Assert<E>) -> Unit): Unit

Asserts on each item in the iterable, passing if none of the items pass. The given lambda will be run for each item.

assertThat(listOf("one", "two")).none {
  it.hasLength(2)
}