Closed SamNelson closed 5 years ago
I think it already supports 3.0.x - is there a particular feature you're looking for please?
It may just be Async testing. Given the following test, I would expect it to fail:
package com.climate.fieldactivities.handler
import org.scalatest.AsyncFunSuite
import scala.concurrent.Future
class AsyncTest extends AsyncFunSuite {
def gimmeFoo(): Future[String] = Future { "foo" }
test("it should be 'foo'") {
val futureFoo: Future[String] = gimmeFoo
futureFoo map {foo =>
assert(foo == "bar")
}
}
}
When I run ./gradlew test, no tests are executed.
./gradlew test
> Task :test
Discovery starting.
Discovery completed in 36 milliseconds.
Run starting. Expected test count is: 0
DiscoverySuite:
Run completed in 96 milliseconds.
Total number of tests run: 0
Suites: completed 1, aborted 0
Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
No tests were executed.
Sorry, I don't seem to be able to reproduce this on macOS:
Please could you share the whole repository (or maybe a build.gradle)?
Task :test FAILED Discovery starting. Discovery completed in 103 milliseconds. Run starting. Expected test count is: 1 AsyncTest:
- it should be 'foo' FAILED (69 milliseconds)
I found my problem. Thanks for the support.
What was the problem please (just for my reference)?
@SamNelson I might have got the same issue. Do you mind sharing the root cause of yours?
seems like mine was caused by mixing IdiomaticMockito
trait. Removing that solved my problem and the test is picked up by both intellij and gradle
I think that Sam had referenced a deprecated scalatest trait, and removed it. I'm not sure which one it was.
Glad you're both up and running.
Is it possible to get a build that supports ScalaTest 3.0.x?