kotest-core / io.kotest.core.spec.style / shouldSpec

shouldSpec

fun shouldSpec(block: ShouldSpecTestFactoryConfiguration.() -> Unit): TestFactory

Creates a TestFactory from the given block.

The receiver of the block is a ShouldSpecTestFactoryConfiguration which allows tests to be defined using the 'should-spec' style.

Example:

"some test" { "with context" { should("do something") { // test here } } }

or

should("do something") { // test here }