Add coverage-focused tests across utility and HTTP packages#3
Add coverage-focused tests across utility and HTTP packages#3
Conversation
|
@claude pls review |
|
Claude finished @GodPuffin's task in 1m 41s —— View job PR Review: Add coverage-focused tests across utility and HTTP packages
Overall this is a solid set of coverage tests. The structure is clean, error messages are descriptive, and HTTP handler tests make proper use of Issues1. Template cache not cleaned up on test failure —
// current
func TestRenderPageUsesSessionDefaults(t *testing.T) {
resetTemplateCache()
...
}
// better
func TestRenderPageUsesSessionDefaults(t *testing.T) {
t.Cleanup(resetTemplateCache)
resetTemplateCache()
...
}2.
3. Duplicate
4. Setup(nil, e)This works today because route registration doesn't dereference the app, but it's fragile. If a handler is ever registered inline with a closure that captures the app, or if a middleware is wired during Minor observations
SummaryThe test suite is well-written and achieves the stated coverage goals. The two issues most worth fixing before merge are the |
|
@claude, made some updates what do you think now? |
|
Claude finished @GodPuffin's task in 51s —— View job Re-review: Add coverage-focused tests across utility and HTTP packages
All four issues from the previous review have been resolved: Issue 1 — Issue 2 — Issue 3 — Duplicate Issue 4 — The minor observations from before still apply (low priority):
None of these are blockers. The test suite looks good to merge. |
Summary
Verification
go test ./...golangci-lint run --timeout=5m0sgo test ./... -coverprofile=coverageCoverage Notes
16.4%router(87.9%),view(85.7%),sessionutil(100%),random(92.3%),bootstrap(56.7%),middleware(60.0%), and improvedauth/profilehandler coverage