Skip to content

Commit bbf978c

Browse files
add README to testdata folder
1 parent 408dca9 commit bbf978c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

testdata/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Testdata
2+
3+
_The "testdata" folder holds various combinations of inputs and expected outputs to check that the library still works._
4+
5+
**You found a problematic HTML snippet? Great!**
6+
7+
Add your problematic HTML snippet to one of the `input.html` files in the `testdata` folder. Then run `go test -update` and have a look at which `.golden` output files changed in GIT.
8+
9+
_Note:_ Adding big block of HTML is not that helpful, so please:
10+
11+
1. narrow it down to the basic HTML structure that still causes the problem,
12+
2. remove any unnecessary attributes (e.g. data-attributes) and
13+
3. generalise the content (e.g. update links, replace text with lorem ipsum).
14+
15+
**=> Make sure it has been changed enough to be considered your own work!**
16+
17+
You can rerun `go test -update` until you are happy with the test case that you want to commit. Thanks for expanding the test cases!

0 commit comments

Comments
 (0)