Joffrey
10/07/2021, 6:05 PM@BeforeClass
/ @AfterClass
in multiplatform common tests? AFAICT these annotations are JVM-only at the moment 😞
I could add cleanup after each test, but that's a bit overkill, and may not work for every use case.ephemient
10/07/2021, 6:09 PMBig Chungus
10/07/2021, 6:21 PMJoffrey
10/07/2021, 6:22 PM@Before
/`@After` behaviour, where setup/cleanup is executed for each test. I'm looking for a single setup/cleanup for all tests.Big Chungus
10/07/2021, 6:24 PMJoffrey
10/07/2021, 6:31 PM@BeforeTest
and @AfterTest
are already supported out of the box on all platforms, though:
https://kotlinlang.org/api/latest/kotlin.test/kotlin.test/-before-test/
https://kotlinlang.org/api/latest/kotlin.test/kotlin.test/-after-test/
So I already have this option without extra hack (which is what I'm doing now), but I wanted to have class-level hooks to avoid unnecessary work (I use these hooks to generate reports).Big Chungus
10/07/2021, 6:32 PMephemient
10/07/2021, 6:39 PMJoffrey
10/07/2021, 6:43 PMBeforeClass
docs that it's not supported in common code, I don't think the Kotlin team just "forgot". There is likely some blocker they must have faced but I'd be interested in knowing what exactly.