Description
Bug Report Checklist
- I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
- I have searched for related issues and issues with the
faq
label, but none matched my issue. - I have 'smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, my usage of Mocha, or Mocha itself.
- I want to provide a PR to resolve this
Expected
Prior to #5256, I was able to:
- watch files outside of the CWD
- watch files specified with an absolute path
I expect to still be able to do this.
Actual
I am only able to watch files inside the CWD, and they must be specified as relative paths to the CWD.
Minimal, Reproducible Example
MCVE: https://github.com/zsalzbank/mocha-watch-mcve
Versions
mocha: 11.2.2
node: v20.13.1
os: ubuntu
shell: bash
Additional Info
chokidar
used to get passed the watchFiles
, but now it only gets passed the current directory.