I have the following test class:
import org.scalatest.FunSuite @RunWith(classOf[JUnitRunner]) class NodeScalaSuite extends FunSuite {
Using this testing method:
test("Now doesn't terminate future that not done") { val testFuture: Future[Int] = Future{ wait(1000) 10 } assertThrows[NoSuchElementException]{ testFuture.now } }
I get this error:
not found: value assertThrows
I looked at the ScalaTest documentation here http://doc.scalatest.org/3.0.0/#org.scalatest.FunSuite , and code similar to mine seems to work fine.
What is the problem?
source share