最严重的问题:值 FunSuite 不是 org.scalatest 的成员

Scalatest problem : value FunSuite is not a member of org.scalatest

我正在尝试在 Scala 3 中为我的项目编写测试。我将 Scalatest 库添加为:

libraryDependencies ++= Seq( 
   ....
  "org.scalatest"           %% "scalatest"                  % "3.2.9"   % Test
)

我知道我的结构是正确的:

但它给我错误:

value FunSuite is not a member of org.scalatest - did you mean scalatest.funsuite?

但是,我在另一个项目中使用了相同的方法,并且效果很好。

感谢@Johney

正确的用法如下(至少在 scala 3.0.2 中):

import org.scalatest.funsuite.*

class TestParser extends AnyFunSuite {
}

当然还有Getting started with FunSuite are based using import org.scalatest.FunSuite but the right examples is here which also referred as a first mention of FunSuite in Getting started with FunSuite.

等教程