JosiahWitt / ensure

A balanced test framework for Go
MIT License
8 stars 0 forks source link

Swap to calling Errorf instead of Fatalf from Cleanup #46

Closed JosiahWitt closed 3 years ago

JosiahWitt commented 3 years ago

Keeps panics that are raised after the chain is built from being silenced.

For example, this used to fail the test with only Found ensure(<actual>) without chained assertion., when the error was actually a panic. Now the full panic will be shown.

someSmallSlice := []string{"one item"}
ensure("hi").Equals(someSmallSlice[10000])
codecov-commenter commented 3 years ago

Codecov Report

Merging #46 (550d4d6) into master (fd3a99f) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #46   +/-   ##
=======================================
  Coverage   99.31%   99.31%           
=======================================
  Files           6        6           
  Lines         437      437           
=======================================
  Hits          434      434           
  Misses          2        2           
  Partials        1        1           
Impacted Files Coverage Δ
ensurepkg/ensurepkg.go 91.89% <100.00%> (ø)

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 fd3a99f...550d4d6. Read the comment docs.