Kotest - Not able to resolve kotest import statements - Unresolved reference: shouldBe

188 Views Asked by At
import org.junit.jupiter.api.Test
import io.kotest.matchers.shouldBe

class Test {

    @Test
    fun test() {
        val str = "abc"
        str shouldBe "abc"
    }
}

I am able to run the test from Intellj, However, IDE is not resolving shouldBe import. Seeing Unresolved reference: shouldBe message. IDE is not resolving any matchers from kotest.

I have invalid Any pointers?

1

There are 1 best solutions below

0
Anton Mefodichev On
  1. Make sure the dependencies are correctly added
  2. Try to rebuild the project
  3. Try to Invalidate Caches in IDEA: https://www.jetbrains.com/help/idea/invalidate-caches.html
  4. Try to reproduce the issue in the latest IDEA version.

If the issue persist:

Please create a ticket to KTIJ project and attach the project with the issue reproduction: https://youtrack.jetbrains.com/newIssue

Thank you!