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 first round of tests for *Spinner type and associated functions #4

Closed theckman closed 4 years ago

theckman commented 4 years ago

This adds the first round of tests for the *Spinner type, and simplified the New() constructor function in the process. To use the go-cmp package, I also needed to export the fields of the unexported character type.

codecov[bot] commented 4 years ago

Codecov Report

Merging #4 into master will increase coverage by 39.76%. The diff coverage is 82.6%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master       #4       +/-   ##
===========================================
+ Coverage    4.09%   43.85%   +39.76%     
===========================================
  Files           2        2               
  Lines         293      285        -8     
===========================================
+ Hits           12      125      +113     
+ Misses        281      155      -126     
- Partials        0        5        +5
Impacted Files Coverage Δ
spinner.go 41.39% <82.6%> (+41.39%) :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 753a22c...9651680. Read the comment docs.