- “go test” sets pwd as package directory
- should never return an error they should access to the
t.Helper()in the beginning (works only for go1.9+)
- for things reqiuiring clean up return closures
- Unconfigurable behavior is often a point of difficulty for tests. e.g. ports, timeouts, paths.
- Over-parameterize structs to allow tests to fine-tune their behavior
- It’s ok to make these configs unexported so only tests can set them.