```class ExampleTest() : FunSpec({ context("fo...
# kotest
s
Copy code
class ExampleTest() : FunSpec({
    context("foo") {
        beforeTest {
            // to things related to context foo
            println("running foo before")
        }
        test("foo-test") {
            "foo".length shouldBe 3
        }
    }
    context("bar") {
        beforeTest{
            // to things related to context bar
            println("running bar before")
        }
        test("bar-test") {
            "bar".length shouldBe 3
        }
    }
})
Output of above is:
running foo before
running foo before
running foo before
running bar before
Is that the expected behaviour @sam?