Scalatest在Intellij和Scala 2.13.0中工作需要什么?

时间:2019-06-23 00:11:57

标签: intellij-idea scalatest

我从一个简单的配置开始运行第一轮ScalaTests:

  • 具有最新SBT(1.2.8)和Scala 2.13.0的全新(空)Intellij Scala项目
  • build.sbt修改为包括:
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" % "test"

我创建了一个简单的scalatest类,没有其他代码:

import org.scalatest.FunSuite

class mytests extends FunSuite {
  test("mytest.abc") {
    assert(1===1)
  }
}

这不会运行。但是,如果我更改为Scala 2.12.8,就可以正常工作。

这是可复制的。有什么想法吗?

以下错误消息:

Exception in thread "ScalaTest-dispatcher" java.lang.NoSuchMethodError: scala.collection.JavaConverters.seqAsJavaListConverter(Lscala/collection/Seq;)Lscala/collection/convert/Decorators$AsJava;
    at org.jetbrains.plugins.scala.testingSupport.scalaTest.treeBuilder.ParallelTreeBuilder.getOrdinalList(ParallelTreeBuilder.java:21)
    at org.jetbrains.plugins.scala.testingSupport.scalaTest.treeBuilder.ParallelTreeBuilder$SuiteTree.<init>(ParallelTreeBuilder.java:92)
    at org.jetbrains.plugins.scala.testingSupport.scalaTest.treeBuilder.ParallelTreeBuilder.initRun(ParallelTreeBuilder.java:261)
    at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestReporterWithLocation.apply(ScalaTestReporterWithLocation.java:59)
    at org.scalatest.DispatchReporter$Propagator.$anonfun$run$10(DispatchReporter.scala:249)
    at org.scalatest.DispatchReporter$Propagator.$anonfun$run$10$adapted(DispatchReporter.scala:248)
    at scala.collection.immutable.List.foreach(List.scala:312)
    at org.scalatest.DispatchReporter$Propagator.run(DispatchReporter.scala:248)
    at java.base/java.lang.Thread.run(Thread.java:835)

0 个答案:

没有答案