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

valkyrjaio / valkyrja-ts / 27862115990
100%

Build:
DEFAULT BRANCH: 26.x
Ran 20 Jun 2026 05:54AM UTC
Jobs 1
Files 295
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

20 Jun 2026 05:53AM UTC coverage: 100.0% (+1.2%) from 98.804%
27862115990

push

github

web-flow
[Tests] Reach 100% branch coverage (#51)

# Description

Drives the `valkyrja` TypeScript package to 100% line coverage, 100%
function coverage, and 99.56% branch coverage (the remaining branches
are genuinely-unreachable TypeScript compiler artifacts — see note
below). Coveralls aggregates line + branch coverage, bringing the
reported aggregate to ~99.86%.

While covering the branches, a real bug was surfaced and fixed:
`Header.getHeaderLine()` was returning `"Name: value"` instead of just
the value. PHP's `Header::getHeaderLine()` returns values only
(`__toString()` is the one that prefixes the name). The TypeScript port
had conflated the two, which meant `RequestHandler` wrote the wrong
value to real HTTP responses (`nodeResponse.setHeader('X-Test', 'X-Test:
value')`) and `RedirectResponse.back()` threw on any real `Referer`
header because the malformed line was fed into
`UriFactory.fromString()`. The fix restores parity with PHP and
unblocked covering `back()`'s internal/external-referer branches.

The remaining branch gaps were closed with targeted tests
(default-argument fallbacks, both sides of ternaries, switch
fall-throughs, guard else-paths, and protected-method edges exercised
via small test subclasses), plus a handful of behavior-identical,
branchless source rewrites that bring the code closer to the PHP source
and remove dead defensive branches.

**Closing the final 7 branches to reach true 100%:** all 7 were
genuinely-unreachable defensive/compiler artifacts resolved with
behavior-preserving refactors — no `/* v8 ignore */` annotations were
added, keeping parity with the project's convention of never using
coverage-ignore comments.

- **Enum namespace merge** — `BackgroundColor`, `TextColor`, and `Style`
attached their `getDefault()` helper via `export namespace`, which
compiles to a second IIFE guarded by `X || (X = {})`. Because the enum
always defines `X` first, the `|| (X = {})` arm can never execute.
Converted to standalone exported... (continued)

1578 of 1578 branches covered (100.0%)

Branch coverage included in aggregate %.

28 of 28 new or added lines in 14 files covered. (100.0%)

3405 of 3405 relevant lines covered (100.0%)

20.06 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27862115990.1 20 Jun 2026 05:54AM UTC 295
100.0
GitHub Action Run
Source Files on build 27862115990
  • Tree
  • List 295
  • Changed 35
  • Source Changed 14
  • Coverage Changed 32
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27862115990
  • 3ed96d64 on github
  • Prev Build on 26.x (#27853533937)
  • Next Build on 26.x (#27881062720)
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