Is there a known limitation when using `checkAll` ...
# kotest
k
Is there a known limitation when using
checkAll
with arrays?
Copy code
class TestUsingCheckAllWithArray : FreeSpec({
    "test" {
        checkAll<Array<String>> {
            // whatever
        }
    }
})
This produces:
Copy code
java.lang.IllegalStateException: Could not locate a primary constructor for kotlin.Array
	at io.kotest.property.arbitrary.JvmbindKt.forClassUsingConstructor(jvmbind.kt:84)
	at io.kotest.property.arbitrary.TargetDefaultForClassNameKt.targetDefaultForType(targetDefaultForClassName.kt:73)
	at io.kotest.property.resolution.JvmArbResolver.resolve(platformArbResolver.kt:11)
	at io.kotest.property.resolution.ResolveKt.resolve(resolve.kt:28)
	at TestUsingCheckAllWithArray$1$1.invokeSuspend(MyTest.kt:34)
There is a workaround:
Copy code
checkAll<List<String>> {
            val array = it.toTypedArray()
            foo(array) shouldBe ...
        }
But it would be nice if it worked with Array directly.
s
We can add that
s
https://github.com/kotest/kotest/pull/3728 @Klitos Kyriacou Merged! 🙂
thank you color 1