kotest-core / io.kotest.core.listeners / TestListener / prepareSpec

prepareSpec

open suspend fun prepareSpec(kclass: KClass<out Spec>): Unit

Called once per Spec, when the engine is preparing to execute the tests for that spec.

Regardless of how many times the spec is instantiated, for example, if InstancePerTest or InstancePerLeaf isolation modes are used, this callback will only be invoked once.

Parameters

kclass - the Spec class