Is there a matcher to assert each element of the l...
# kotest
d
Is there a matcher to assert each element of the list matches some predicate? Something like
Copy code
stringList shouldHaveEach { it.length > 10 }
I have found
shouldMatchEach
but it requires assertions.size == list.size, not quite what I'm looking for. Or should I just use
Copy code
stringList.forEach { it.length shouldBeGreaterThan 10 }
s
d
Great, didn't know about them, thanks!