Skip to content

Commit e27c61a

Browse files
committed
Add demo animation
1 parent 6da1d97 commit e27c61a

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,25 @@
55

66
![Writing gopher logo](img/gotestdox.png)
77

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:
911

1012
```
1113
go install github.com/bitfield/gotestdox/cmd/gotestdox@latest
1214
```
1315

14-
# What?
16+
In any Go project, run:
17+
18+
```
19+
gotestdox ./...
20+
```
21+
22+
![Animated demo](img/demo.gif)
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.
1527

1628
For example, suppose we have some tests named like this:
1729

@@ -20,7 +32,7 @@ TestValidIsTrueForValidInputs
2032
TestValidIsFalseForInvalidInputs
2133
```
2234

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`:
2436

2537
**`gotestdox`**
2638

img/demo.gif

114 KB
Loading

0 commit comments

Comments
 (0)