Created this: ```import arrow.core.Either import io.kotest.matchers.shouldBe import io.kotest.matche...
s
Created this:
Copy code
import arrow.core.Either
import io.kotest.matchers.shouldBe
import io.kotest.matchers.types.shouldBeTypeOf

inline fun <reified E : Throwable> Either<Throwable, *>.shouldBeLeftThrowableWithMessage(
    expectedMessage: String
) =
    apply {
        isLeft() shouldBe true
        mapLeft { throwable ->
            throwable.shouldBeTypeOf<E>()
            throwable.message shouldBe expectedMessage
        }
    }