• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alexferl / zerohttp / 23713706355
94%

Build:
DEFAULT BRANCH: master
Ran 29 Mar 2026 04:33PM UTC
Jobs 1
Files 89
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Mar 2026 04:32PM UTC coverage: 93.765% (+0.3%) from 93.467%
23713706355

push

github

web-flow
refactor(tests): migrate all tests to zhtest assertion helpers (#153)

* refactor(tests): migrate all tests to zhtest assertion helpers

Replace manual t.Error/t.Fatalf calls with zhtest assertion helpers
across 124 test files. This provides consistent error messages and
reduces test boilerplate.

Key changes to zhtest/assert.go:
- Enhanced AssertEqual/AssertNotEqual with numeric type coercion
  to allow comparing int with int64, float64, etc.
- Added AssertPanic/AssertNoPanic for panic testing
- Added AssertGreater/AssertLess for numeric comparisons
- Added AssertFail/AssertFailf for fatal test failures
- Added AssertContains/AssertNotContains for strings and slices

Example migration patterns:
- t.Error("msg") -> zhtest.AssertFail(t, "msg")
- t.Fatalf("msg", val) -> zhtest.AssertFailf(t, "msg", val)
- t.Error("expected X") -> zhtest.AssertEqual(t, X, actual)
- if err != nil { t.Error(...) } -> zhtest.AssertNoError(t, err)
- defer/recover panic checks -> zhtest.AssertPanic(t, fn)

Also updated doc strings in zhtest to use the new assertion style.

Signed-off-by: alexferl <me@alexferl.com>

* increase coverage

Signed-off-by: alexferl <me@alexferl.com>

* increase coverage

Signed-off-by: alexferl <me@alexferl.com>

---------

Signed-off-by: alexferl <me@alexferl.com>

180 of 219 new or added lines in 1 file covered. (82.19%)

12 existing lines in 4 files now uncovered.

10001 of 10666 relevant lines covered (93.77%)

462.75 hits per line

Uncovered Changes

Lines Coverage ∆ File
39
90.35
-3.57% zhtest/assert.go

Coverage Regressions

Lines Coverage ∆ File
4
88.68
-0.75% server.go
4
90.35
-3.57% zhtest/assert.go
2
94.72
6.94% metrics/metrics.go
2
95.24
0.0% sse/sse.go
Jobs
ID Job ID Ran Files Coverage
1 23713706355.1 29 Mar 2026 04:33PM UTC 89
93.77
GitHub Action Run
Source Files on build 23713706355
  • Tree
  • List 89
  • Changed 9
  • Source Changed 4
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23713706355
  • ea63ade0 on github
  • Prev Build on master (#23688405301)
  • Next Build on master (#23716660517)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc