You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+15-3
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,25 @@
5
5
6
6

7
7
8
-
`gotestdox` is a command-line tool for turning Go test names into readable sentences. Here's how to install it:
8
+
`gotestdox` is a command-line tool for formatting Go test results as readable documentation, as recommended in my book [The Power of Go: Tests](https://bitfieldconsulting.com/books/tests).
9
+
10
+
Here's how to install it:
9
11
10
12
```
11
13
go install github.com/bitfield/gotestdox/cmd/gotestdox@latest
12
14
```
13
15
14
-
# What?
16
+
In any Go project, run:
17
+
18
+
```
19
+
gotestdox ./...
20
+
```
21
+
22
+

23
+
24
+
# What does it do?
25
+
26
+
`gotestdox` runs your tests and reports the results, but it formats their names in a special way. It converts test names WrittenInCamelCase into ordinary sentences.
15
27
16
28
For example, suppose we have some tests named like this:
17
29
@@ -20,7 +32,7 @@ TestValidIsTrueForValidInputs
20
32
TestValidIsFalseForInvalidInputs
21
33
```
22
34
23
-
We can transform them into straightforward sentences that express the desired behaviour, by running `gotestdox`:
35
+
We can transform them into readably-spaced sentences that express the desired behaviour, by running `gotestdox`:
0 commit comments