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

ContextScope

class ContextScope

Types

TestBuilder

inner class TestBuilder

Constructors

<init>

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

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

test

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