IntelliJ IDEA 2025.1 junit is red in "import org.junit.jupiter.api.Test" - Kotlin and Maeven
已回答
In my test “PostSendingServiceTest.kt” I am importing org.junit.jupiter.api.Test, but the word junit is red.

in my pom.xml I am using the following dependency:
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
What should I import as dependency so that it is not red anymore?
请先登录再写评论。
The behavior looks similar with the following ticket: https://youtrack.jetbrains.com/issue/KTIJ-34196/K2-Transitive-junit-jupiter-api-dependency-isnt-recognized-when-pulled-via-mockk-in-Maven-test-scope
Can you please provide a project with the issue reproduction? Thank you in advance!