Hi! I'm just migrating a few JUnit tests to Kotest...
# kotest
h
Hi! I'm just migrating a few JUnit tests to Kotest, which works great, but now I face a problem: In my JUnit test I have an extension of type
TestWatcher
Copy code
@ExtendWith(TestResultNotifier::class)
class MusicTeaserTests {
I have no idea how to migrate that to Kotest. There seems to be a
JUnitExtensionAdapter
class which should provide such support, but how do I use this?
Answering my own question:
Copy code
extension(JUnitExtensionAdapter(TestResultNotifier()))
does the trick.
You also need to add
Copy code
testImplementation("io.kotest:kotest-extensions-junit5")
I'll see if I can add this to the kotest docs, as it took quite some time to figure this out.
🌟 1
👍🏻 1
s
What does TestWatcher do ?