Every good package has unit tests. Write a few, get the coverage stamp on the README, and maybe find a couple bugs along the way. Having good test coverage is a great way to make sure new code won't break the system on a refactoring or new feature.
The testing package is probably all that's needed, but it's probably a good idea to patch the requests and use mocks where necessary. Take a look at a few of the other go testing packages and see if they're necessary.
[x] Add unit testing
[x] filter_test.go
[x] Multiple values for unsupported filter
[x] Multiple values for supported filter
[x] Single value for filter
[x] No values for filter
[x] screener_test.go
[x] GenerateURL
[x] all inputs (valid)
[x] duplicate filters
[x] views_test.go
[x] Scrape
EDIT: Added the coverage badge. Currently using the testing, govcr, and testify packages to write unit tests.
Every good package has unit tests. Write a few, get the coverage stamp on the README, and maybe find a couple bugs along the way. Having good test coverage is a great way to make sure new code won't break the system on a refactoring or new feature.
The
testing
package is probably all that's needed, but it's probably a good idea to patch the requests and use mocks where necessary. Take a look at a few of the othergo
testing packages and see if they're necessary.filter_test.go
screener_test.go
views_test.go
EDIT: Added the coverage badge. Currently using the
testing
,govcr
, andtestify
packages to write unit tests.