FollowTheProcess / test

A lightweight test helper package 🧪
MIT License
0 stars 0 forks source link

Add test.Err and clean up tests #2

Closed FollowTheProcess closed 1 year ago

FollowTheProcess commented 1 year ago

Description

Adds a public function test.Err that fails if the provided err is equal to nil. effectively the opposite of test.Ok

Also refactored the tests to be neater and call shouldPass or shouldFail in a loop

Motivation and Context

Closes #

How Has This Been Tested?

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (fc3bb0c) 100.00% compared to head (a7d18d1) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 50 55 +5 ========================================= + Hits 50 55 +5 ``` | [Files Changed](https://app.codecov.io/gh/FollowTheProcess/test/pull/2?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Fleet) | Coverage Δ | | |---|---|---| | [test.go](https://app.codecov.io/gh/FollowTheProcess/test/pull/2?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Fleet#diff-dGVzdC5nbw==) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.