Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs #300

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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