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

valkyrjaio / valkyrja-ts / 30322573145
100%

Build:
DEFAULT BRANCH: 26.x
Ran 28 Jul 2026 02:15AM UTC
Jobs 1
Files 302
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

28 Jul 2026 02:15AM UTC coverage: 100.0%. Remained the same
30322573145

push

github

web-flow
[Application] Add overridable runtime seams to HTTP entries and end-to-end tests (#88)

# Description

Makes the HTTP entry points (`Http` and `WorkerHttp`) genuinely testable
end to
end and proves each serves a live request, mirroring the PHP work in
`valkyrja-php#919`/`#920`.

Unlike PHP — whose worker entries rebuilt the request from globals and
dropped
the response — the TypeScript entries were already correct: both convert
the
native Node request into a framework `ServerRequest` and pass the native
response
into `RequestHandler.run(...)`, which writes the framework response
(status,
headers, body) back through it. The gap here was **testability**: the
irreducible
runtime I/O (`http.createServer` / `server.listen`) was exercised via a
module-level `vi.mock('node:http')` rather than an overridable seam.

This PR extracts each runtime I/O call into an overridable static seam
method
(coverage-ignored, the direct equivalent of PHP's `@codeCoverageIgnore`
runtime
seams), so a test double can drive the full per-request path without
opening a
socket. It then adds unit, functional, and end-to-end smoke tests that
boot a
real application and drive `run()` end to end with only the runtime seam
doubled,
asserting a live `GET /` renders the welcome view. Coverage stays at
100% (line
and branch).

Sibling PR: valkyrjaio/valkyrja-starter-app-ts#78 — adds the runnable
`bin/http.ts` and `bin/worker-http.ts` entries and over-the-socket
end-to-end
tests built on these seams.

## Types of changes

- [x] Improvement _(non-breaking change which improves code)_
- [ ] Bug fix _(non-breaking change which fixes an issue)_
- [ ] New feature _(non-breaking change which adds functionality)_
- [ ] Deprecation _(breaking change which removes functionality)_
- [ ] Breaking change _(fix or feature that would cause existing
functionality to change)_
- [ ] Documentation improvement

## Changes

- **`src/Valkyrja/Application/Entry/Http.ts`** — extracted
`createServer` /
  `listen` ... (continued)

1585 of 1585 branches covered (100.0%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 2 files covered. (100.0%)

3466 of 3466 relevant lines covered (100.0%)

24.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30322573145.1 28 Jul 2026 02:15AM UTC 302
100.0
GitHub Action Run
Source Files on build 30322573145
  • Tree
  • List 302
  • Changed 2
  • Source Changed 2
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30322573145
  • dfc69240 on github
  • Prev Build on 26.x (#30237514553)
  • Next Build on 26.x (#30324890379)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc