Skip to content

Commit

Permalink
Merge pull request #300 from lambdista/docsfix
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
gabro authored Jan 20, 2021
2 parents 94c0770 + c0aa599 commit 556de6a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Note that `Await.result()` only works on the JVM. Scala.js and Scala Native
tests that return uncompleted `Future[T]` values will fail.

MUnit has special handling for `scala.concurrent.Future[T]` since it is
available in the standard library. Override `munitTestValue` to add custom
available in the standard library. Override `munitValueTransforms` to add custom
handling for other asynchronous types.

For example, imagine that you have a `LazyFuture[T]` data type that is a lazy
Expand All @@ -86,8 +86,8 @@ test("buggy-task") {
```

Since tasks are lazy, a test that returns `LazyFuture[T]` will always pass since
you need to call `run()` to start the task execution. Override `munitTestValue`
to add make sure that `LazyFuture.run()` gets called.
you need to call `run()` to start the task execution. Override `munitValueTransforms`
to make sure that `LazyFuture.run()` gets called.

```scala mdoc
import scala.concurrent.ExecutionContext.Implicits.global
Expand Down Expand Up @@ -191,7 +191,7 @@ bug report but don't have a solution to fix the issue yet.

## Customize evaluation of tests with tags

Override `munitRunTest()` to extend the default behavior for how test bodies are
Override `munitTestTransforms()` to extend the default behavior for how test bodies are
evaluated. For example, use this feature to implement a `Rerun(N)` modifier to
evaluate the body multiple times.

Expand Down Expand Up @@ -220,7 +220,7 @@ class MyRerunSuite extends munit.FunSuite {
}
```

The `munitRunTest()` method is similar to `munitTestValue()` but is different in
The `munitTestTransforms()` method is similar to `munitValueTransforms()` but is different in
that you also have access information about the test in `TestOptions` such as
tags.

Expand Down

0 comments on commit 556de6a

Please sign in to comment.