<@U12AGS8JG> Kotest 6 seems to not honour the orde...
# kotest
k
@sam Kotest 6 seems to not honour the ordering of the specs when defining a
SpecExecutionOrderExtension
. I am logging the return value of my
override fun sort(specs: List<SpecRef>): List<SpecRef>
but the specs executed are in another random order. Do I have to take care of something?
s
Is it definitely picking up your extension?
k
It should yes as I have defined the following:
Copy code
object SpecOrdering : SpecExecutionOrderExtension {

    override fun sort(specs: List<SpecRef>): List<SpecRef> {
        val (isolatedSpecs, normalSpecs) = specs.partition { spec ->
            spec.isIsolatedSpec()
        }

        val sorted = normalSpecs + isolatedSpecs
        println(sorted.map { it.name() })
        return normalSpecs + isolatedSpecs
    }
}
and I can see the print statement
s
Ok then must be a regression. Can you file a ticket and I'll fix this weekend.
k
Ok will open a Github issue tomorrow. Will try also to create a reproducer
Hey @sam. I have created an issue and I have included a reproducer:
<https://github.com/kotest/kotest/issues/5206>
Thank you
s
ty