scalameta/munit

Cannot be run with JUnit 5 runner.

tribbloid opened this issue · 5 comments

Here is an example:

build.gradle.kts

        test {

            useJUnitPlatform {
                includeEngines("scalatest")
                includeEngines("munit")
                testLogging {
                    events("passed", "skipped", "failed")
                }
            }

            testLogging {
                showExceptions = true
                showCauses = true
                showStackTraces = true
            }
        }

file:

import munit.FunSuite

class SimpleSpec extends FunSuite {

  test("abc") {
    assert(1 == 2)
  }
}

When executing junit for this test:

Execution failed for task ':meta:test'.
> No tests found for given includes: [xxx.SimpleSpec](--tests filter)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

So it appears that @RunWith(classOf[MUnitRunner]) annotation doesn't do anything.

The compilation of https://github.com/eyalroth/java-scala-gradle-project/tree/munit also appears to be broken

This is probably blocked by: