theckman / yacspin

Yet Another CLi Spinner; providing over 80 easy to use and customizable terminal spinners for multiple OSes
Apache License 2.0
434 stars 13 forks source link

Add more tests for Spinner methods; add error return to CharSet() #5

Closed theckman closed 4 years ago

theckman commented 4 years ago

This change adds more tests to project coverage, as well as updates the constructor for more implcit testing (through message use for setting values).

This also updates the CharSet() method to return an error so we can do input validation, so that we only recieve valid character sets.

codecov[bot] commented 4 years ago

Codecov Report

Merging #5 into master will increase coverage by 9.08%. The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
+ Coverage   43.85%   52.94%   +9.08%     
==========================================
  Files           2        2              
  Lines         285      289       +4     
==========================================
+ Hits          125      153      +28     
+ Misses        155      130      -25     
- Partials        5        6       +1
Impacted Files Coverage Δ
spinner.go 50.9% <81.81%> (+9.51%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d2d3881...e353165. Read the comment docs.