Skip to content

Commit 0f5b1ec

Browse files
authored
Merge pull request #2 from go-tstr/update-readme
Update readme
2 parents ec432ca + 554fe51 commit 0f5b1ec

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
[![Go Reference](https://pkg.go.dev/badge/github.com/go-tstr/golden.svg)](https://pkg.go.dev/github.com/go-tstr/golden) [![codecov](https://codecov.io/github/go-tstr/golden/graph/badge.svg?token=H3u7Ui9PfC)](https://codecov.io/github/go-tstr/golden) ![main](https://github.com/go-tstr/golden/actions/workflows/go.yaml/badge.svg?branch=main)
2+
13
# golden
2-
Golden file test helper for Go
4+
5+
Golden file testing is a technique where the expected output of a test is
6+
7+
- generated automatically from test
8+
- stored in a separate file (the "golden file")
9+
- verified to never change unless explicitly regerated
10+
11+
During testing, the actual output is compared against the contents of the golden file. If the outputs match, the test passes; if not, the test fails. This approach is especially useful for testing complex outputs such as JSON, HTML, or other structured data, as it makes it easy to review and update expected outputs.

0 commit comments

Comments
 (0)