vitest-dev / vitest-dev/vitest
No test suite found in file on Windows again
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 94
Description
Describe the bug
Hi,
I've found a regression regarding this fix.
Certain applications might launch processes with current working directory with lowercased drive letter (e.g. c:\ instead of C:\).
This breaks vitest, it can't find any test (No test suite found in file).
fs.promises.realpath() fixes drive casing (e.g. c:\ becomes C:\), but fs.realpath() does not.
Reproduction
How to reproduce:
- Open command prompt (
cmd.exe) - Run
cd c:\path_to_dir_with_tests(note the lowercasedc:) - Run
vitest
System Info
vitest/4.0.18 win32-x64 node-v24.13.0
Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure from cmd.exe with a lowercased drive letter, as described, and trace the test-discovery path that uses fs.realpath(). Compare it with fs.promises.realpath(); done means Vitest discovers and runs the tests from that Windows working directory again, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100