wasyl
08/01/2022, 11:26 AMListener
class is deprecated, and listeners()
method on AbstractProjectConfigs
suggests to use `Extension`s instead. However, TestListener
interface (and all the BeforeEachListener
and friends) is not deprecated. Is it an oversight, or I should keep implementing a TestListener
and registering it as an extension?class MyListener : TestListener {
override suspend fun prepareSpec() = foo()
override suspend fun finalizeSpec() = bar()
}
should be translated to
class MyExtension : SpecExtension {
override suspend fun intercept(spec, execute) {
foo()
execute(spec)
bar()
}
}
sam
08/01/2022, 11:38 AMwasyl
08/01/2022, 11:43 AMsam
08/01/2022, 11:45 AMwasyl
08/01/2022, 11:47 AMsam
08/01/2022, 12:00 PMwasyl
08/01/2022, 12:12 PMsam
08/01/2022, 12:14 PMwasyl
08/01/2022, 12:20 PMSpecRefExtension
?sam
08/01/2022, 12:52 PMwasyl
08/01/2022, 12:58 PM