Is there a suggested way to compare the contents o...
# kotest
d
Is there a suggested way to compare the contents of two `List`s from
Either<A, List<B>>
? e.g.
listOf(1, 2).right() shouldContainExactly listOf(2, 1).right()
or
listOf(1, 2).right() shouldContainExactly listOf(2, 1)
As now I used
listOf(1, 2).right().getOrNull() shouldContainExactly listOf(2, 1)
l
I think you can maybe combine shouldBeRight with shouldContainExactly
Something like listOf(1, 2).shouldBeRight() shouldContainExactly listOf(2, 1)
d
Is this
shouldBeRight
part of any extension? For my understanding there was an Arrow extension, but there isn't anymore 🤔
l
ah, I think I mixed up Result and Either
My bad