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

mochajs / mocha / 18176674029 / 17
94%
main: 94%

Build:
DEFAULT BRANCH: main
Ran 01 Oct 2025 10:17PM UTC
Files 50
Run time 5s
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

01 Oct 2025 09:52PM UTC coverage: 43.203% (-0.6%) from 43.799%
18176674029.17

push

github

web-flow
fix: watch mode using chokidar v4 (#5379)

* fix: watch mode using chokidar v4 (#5355)

Glob paths are no longer supported by chokidar starting at v4.

This update works around this by resolving `watchFiles` and `watchIgnore`
to valid paths and creating a list of matchers to determine if the files
should be allowed or ignored through the chokidar `ignored` match function.

This commit reverts changes from 8af0f1a90
so that the watched file changes are not fixed to the current directory.

Additional note: when a `watchFile` path is removed while chokidar is
watching it, recreating the `watchFile` path does not trigger events
from chokidar to rerun the tests.

* refactor: fix watch mode using chokidar v4 (#5355)

This update fixes #5355 and refactors the previous watch mode fix attempt.

Instead of only filtering the paths in the chokidar `ignored` match
function, the chokidar `all` event handler now has a guard to ensure
that only file paths that match the allowed patterns from `watchFiles`
would trigger test reruns.

Doing this solves the issue where creating/deleting directories trigger
test reruns despite the watched path being a file (e.g., `**/*.xyz`)
as the allowed patterns would not match with just the directory paths.

* docs: fix jsdoc description for `normalizeGlob()`

* test: add tests for watch mode

- Test for watched files from outside the current working directory
- Test reruns with a thousand watched files

* test: fix test for multiple watched files

* test: remove test for multiple watched files

The test is dependent on how fast the machine could create 1000 watched
files, otherwise the test could fail due to a timeout error. Reducing
the number of watched files would make the test pass, but doing so would
make it more or less similar to already existing tests. At that point,
the test does not really test the limits of possibly huge projects with
thousands of watched files, so it has been removed instea... (continued)

333 of 1539 branches covered (21.64%)

1570 of 3634 relevant lines covered (43.2%)

2.5 hits per line

Source Files on job run-test-node:only-24.6.0-ubuntu-latest- - 18176674029.17
  • Tree
  • List 50
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 18176674029
  • c2667c3b on github
  • Prev Job for on main (#18174937752.5)
  • Next Job for on main (#18176715694.28)
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