https://github.com/allentv/go-testhelpers
Helper functions for writing unit tests in Golang
https://github.com/allentv/go-testhelpers
testhelpers testing unittest
Last synced: 5 months ago
JSON representation
Helper functions for writing unit tests in Golang
- Host: GitHub
- URL: https://github.com/allentv/go-testhelpers
- Owner: allentv
- License: mit
- Created: 2020-05-08T19:17:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-09T20:39:30.000Z (about 6 years ago)
- Last Synced: 2025-11-22T13:04:50.046Z (7 months ago)
- Topics: testhelpers, testing, unittest
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Test Helpers
Helper functions for writing unit tests in Golang.
The functions are divided into different sections based on their nature or corresponding package in Go.
I have tried to follow best practices of testing wherever possible inspired by [Mitchell Hashimoto](https://speakerdeck.com/mitchellh/advanced-testing-with-go)
Any place where closing a stream/object is deferred, the defer operation is returned as a `closer` function that can be triggered in the test when invoking the function thereby cleaning up correctly after the test is completed.