Search code examples
scalascalatest

Error: "package test is not a value" using scalatest FunSpec


I changed a test from WordMatchers to FunSpec and now can not rid the tests of the following compilation error:

class SangriaDnbIACDataPipelineTest extends FunSpec {

  test("SangriaDnbIACDataPipeline") {
    val args =

enter image description here

 error: package test is not a value
[ERROR]   test("SangriaDnbIACDataPipeline") {

This is on scala 2.11 with scalatest 3.0.1.


Solution

  • I think you're looking for the FunSuite extension:

    import org.scalatest.FunSuite
    
    class SangriaDnbIACDataPipelineTest extends FunSuite {
    
      test("SangriaDnbIACDataPipeline") {
        val args =
    

    See the testing styles