I want to start writing simple tests in Scala using ScalaTest.
But for some reason, I can access org.scalatest
but not org.scalatest.FunSuite
This is what my build.sbt
looks like:
name := "Algorithms"
version := "0.1"
scalaVersion := "2.13.3"
libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.0"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.0" % "test"
I don't understand if it can access scalatest
then why are FunSuite
,FlatSpec
and other styles missing?
Output of running test
on sbt shell
[error] <Project Path>\Algorithms\src\test\scala\Course1\Week1\MaxPairProductTest.scala:3:48: type FunSuite is not a member of package org.scalatest
[error] class MaxPairProductTest extends org.scalatest.FunSuite {
[error] ^