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

FunSpecDsl

interface FunSpecDsl : SpecDsl

Defines the DSL for creating tests in the 'FunSpec' style

Types

ContextScope

class ContextScope

TestBuilder

class TestBuilder

Functions

context

Adds a top level context scope to the spec.

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

test

open fun test(name: String): TestBuilder

Adds a new root test case, with the given name and test function, using the default test case config for this builder.

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

Inheritors

FunSpec

abstract class FunSpec : DslDrivenSpec, FunSpecDsl

FunSpecTestFactoryConfiguration

class FunSpecTestFactoryConfiguration : TestFactoryConfiguration, FunSpecDsl