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

winstonjs / winston / 27106806141
71%

Build:
DEFAULT BRANCH: master
Ran 07 Jun 2026 10:33PM UTC
Jobs 1
Files 17
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

07 Jun 2026 10:32PM UTC coverage: 70.744%. Remained the same
27106806141

push

github

web-flow
test: make File transport coverage deterministic across environments (#2613)

Unit-test line coverage for the File transport fluctuated run-to-run and
across runners / Node versions, which intermittently tripped the Coveralls
"coverage decreased" check on unrelated PRs (the project baseline sits at
the top of the flaky band, so ~half of runs reported a spurious decrease).

The variance came from two code paths in lib/winston/transports/file.js
that were only exercised incidentally, by timing-sensitive tests:

- The stream backpressure path (the `_drain` requeue and the `!written`
  drain handler) was only hit when the OS write buffer happened to fill
  during the file *stress* tests, which depends on I/O throughput.

- The stat() "existing file under maxsize" path was only hit depending on
  leftover filesystem state between tests.

This adds two focused tests that exercise both paths deterministically,
with no production code changes:

- Backpressure is forced with a single write larger than the stream's 16KB
  highWaterMark. That is governed by the in-memory buffer, not disk speed,
  so write() returns false identically on every machine; a second log while
  draining then covers the requeue path.

- The stat path is covered by pre-creating a file before the transport opens.

Coverage is now identical on every run -- verified at 784 covered lines over
70+ runs across Node 22 / 24 / 26, including under heavy CPU load.

442 of 679 branches covered (65.1%)

Branch coverage included in aggregate %.

784 of 1054 relevant lines covered (74.38%)

1139.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27106806141.1 07 Jun 2026 10:33PM UTC 17
70.74
GitHub Action Run
Source Files on build 27106806141
  • Tree
  • List 17
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 1f89222a on github
  • Prev Build on master (#27082503974)
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