BehaviorSpec
是否可以在 kotlintest中配置单个测试用例?
对于StringSpec
测试,可以这样做:
class MyTest : StringSpec({
"this is a test".config(...) {}
})
我似乎不能为 a 做同样的事情BehaviorSpec
。我希望是这样的:
class MyTest : BehaviorSpec({
Given("a foo") {
When("baring") {
Then("bazzing") {
}.config(...)
}
}
})
根据这个应该解决的问题,这已经实现了。但据我所见(使用 kotlintest 3.1.8 版)Then
返回Unit
...