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

ContextScope

class ContextScope

Types

TestBuilder

inner class TestBuilder

Constructors

<init>

ContextScope(description: Description, context: TestContext, spec: ShouldSpecDsl)

Functions

afterTest

fun afterTest(f: AfterTest): Unit

beforeTest

fun beforeTest(f: BeforeTest): Unit

context

Adds a nested context scope to the spec.

suspend fun context(name: String, init: suspend ContextScope.() -> Unit): Unit

should

fun should(name: String): TestBuilder
suspend fun should(name: String, test: suspend TestContext.() -> Unit): Unit