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

cweill / gotests / 18725169102
94%
master: 94%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: master
Ran 22 Oct 2025 05:53PM UTC
Jobs 1
Files 8
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

22 Oct 2025 05:52PM UTC coverage: 96.272% (+11.3%) from 84.978%
18725169102

push

github

web-flow
test: improve code coverage from 28.1% to 84.6% (#196)

Add comprehensive unit tests across all packages, with special focus on
previously untested generics code in render helpers. This brings overall
coverage from 28.1% to 84.6% (201% increase).

## New Test Files

- **internal/render/helpers_test.go** (650+ lines)
  - Complete coverage of all 11 helper functions (93-100%)
  - Comprehensive generics tests: type arguments, constraint mapping
  - Tests for all constraint types: any, comparable, unions, approximations
  - Numeric constraint tests: constraints.Integer, Ordered, etc.
  - Type parameter substitution in fields and receivers

- **internal/models/models_test.go** (700+ lines)
  - 17 test functions covering all model methods
  - Expression, Field, Function, Receiver, Path tests
  - Coverage: 0% → 98.0%

- **internal/goparser/goparser_test.go** (150+ lines)
  - Parser tests with generics support
  - Import handling, error cases
  - Coverage: 0% → 73.3%

- **internal/render/render_test.go** (215+ lines)
  - Template rendering and loading tests
  - Coverage: 0% → 96.4%

- **internal/output/helpers_test.go**
  - File existence helper tests
  - Coverage improvement: 8.3% → 69.4%

## Enhanced Test Files

- **internal/output/options_test.go**
  - Added Process() method tests with various configurations
  - Tests for subtests, print inputs, go-cmp options

- **gotests/process/process_test.go**
  - Added comprehensive option tests
  - Template parameter tests, JSON validation
  - Coverage: 60.7% → 78.7%

## Coverage Results by Package

| Package | Before | After | Improvement |
|---------|--------|-------|-------------|
| internal/render (helpers) | 0% | 93-100% | ✅ ALL generics |
| internal/models | 0% | 98.0% | ✅ |
| internal/goparser | 0% | 73.3% | ✅ |
| internal/render | 0% | 96.4% | ✅ |
| internal/output | 8.3% | 69.4% | ✅ |
| gotests/process | 60.7% | 78.7% | ✅ |
| **Overall** | **28.1%** | **84.6%** | **+201%** |

## Key Achievement

All generic... (continued)

878 of 912 relevant lines covered (96.27%)

1176.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 18725169102.1 22 Oct 2025 05:53PM UTC 8
96.27
GitHub Action Run
Source Files on build 18725169102
  • Tree
  • List 8
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 332fbf45 on github
  • Prev Build on develop (#18724049388)
  • Next Build on develop (#18756499982)
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

© 2025 Coveralls, Inc