Idea 2024.3.2.2 does not respect kotlin test file template
已回答
Not that long ago I noticed that IDE started to generate test templates with bad formatting, like so
package ...
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Assertions.*
class Cs21LauncherTest {
@Test
fun launch() {}
}
When I have standard kotlin code style with 4 spaces of indentation.
Moreover, I found test template, modified imports to my needs, but this also is not used by IDE.

I found out that IDE is creating java test class first, and then converts it to kotlin with bad indents. Why?
I am creating tests like this

请先登录再写评论。
Can confirm the issue, java Junit5 test template is used instead of kotlin Junit5 test template
And to add one more thing – generating a test class doesn't work for Kotlin `interface`, but works for Java `interface`.
Interface might be annotated and generate some code that needs to be unit-tested, eg. Mapstruct
Created issue: https://youtrack.jetbrains.com/issue/KTIJ-33341/Idea-does-not-respect-kotlin-test-file-template