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

panates / opra / 37793069155
86%
main: 86%

Build:
Build:
LAST BUILD BRANCH: dev
DEFAULT BRANCH: main
Ran 08 Oct 2026 02:34PM UTC
Jobs 1
Files 392
Run time 2min
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

08 Oct 2026 02:30PM UTC coverage: 85.923% (+0.03%) from 85.896%
37793069155

push

github

erayhanoglu
fix(testing): Buffer the request body, and close only a server we started

Two faults in `TestBackend#send`, both reported from a project testing
against it.

A request with a body answered `401` rejected with `TypeError: fetch
failed` (cause: "expected non-null body source") instead of resolving
with the 401 the test was asserting on. `send` handed `fetch` the
`Request` object itself as its init, so the body was always that
request's own one-shot stream — undici replays a 401 with credentials
(`httpNetworkOrCacheFetch`) and a stream cannot be replayed. The body is
read into a byte array first now. This never depended on
`reportProgress`, which is the only place the client itself builds a
stream body: every request with a body was one replay away from it, and
nothing but a 401 asked for the replay.

`send` also closed the server after every response, whether or not it
had started it. A test that listens itself (`app.listen(0)`) lost its
server to the first `OpraTestClient` call, and every later request —
including ones made with something other than this client — got
ECONNREFUSED. It now closes only a server it started. A
`RequestListener` is unaffected: `TestBackend` creates that server, so
it still starts and closes one per request.

`send` is an async function with a `try/finally` rather than a chain of
`then`s around a manual `resolve`/`reject`, which is what let the close
be stated once instead of once per outcome.

First tests for the package, which had a `.mocharc.cjs` and no `test`
directory: one per fault, plus two pinning the behaviour that was
already right.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

4801 of 6145 branches covered (78.13%)

Branch coverage included in aggregate %.

45 of 45 new or added lines in 1 file covered. (100.0%)

3 existing lines in 1 file now uncovered.

40863 of 47000 relevant lines covered (86.94%)

312.36 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
83.33
2.76% packages/http/src/impl/local-file.ts
Jobs
ID Job ID Ran Files Coverage
1 37793069155.1 08 Oct 2026 02:34PM UTC 392
85.92
GitHub Action Run
Source Files on build 37793069155
  • Tree
  • List 392
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37793069155
  • f00ef554 on github
  • Prev Build on dev (#37743742806)
  • Next Build on dev (#38210735960)
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