d3an / finviz

Go API for Finviz
https://github.com/d3an/finviz/wiki
MIT License
20 stars 3 forks source link

Add unit tests #18

Closed d3an closed 2 years ago

d3an commented 4 years ago

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.

EDIT: Added the coverage badge. Currently using the testing, govcr, and testify packages to write unit tests.