mirror of
https://codeberg.org/forgejo/docs.git
synced 2024-11-23 17:59:25 -05:00
Document gotestsum use
Depends-On: https://codeberg.org/forgejo/forgejo/pulls/5249
This commit is contained in:
parent
8418b8bd50
commit
bf81d30d6e
1 changed files with 17 additions and 0 deletions
|
@ -172,3 +172,20 @@ The exact test steps must be documented in the description of the pull request.
|
|||
|
||||
Changes that are associated with manual tests must be labeled
|
||||
["test/manual"](https://codeberg.org/forgejo/forgejo/issues?labels=201028).
|
||||
|
||||
## Using gotestsum for summaries
|
||||
|
||||
By default, the `make` targets use the built-in `go test` command.
|
||||
However, it does not produce clear summaries of test results
|
||||
which are useful for understanding quickly the extent of failures.
|
||||
The provided `Makefile` supports switching to [`gotestsum`](https://github.com/gotestyourself/gotestsum)
|
||||
using `USE_GOTESTSUM=yes` while running tests, for example:
|
||||
|
||||
```sh
|
||||
USE_GOTESTSUM=yes make test
|
||||
```
|
||||
|
||||
`gotestsum` behaves like the default `go test` except it reformats the test results
|
||||
so that they are clearer for human interpreation and include a helpful summary.
|
||||
|
||||
You need to have `gotestsum` installed (see the link above) to use it as it does not come built-in unlike `go test`.
|
||||
|
|
Loading…
Reference in a new issue