vitest-dev / vitest-dev/vitest

No test suite found in file on Windows again

Open
#9,507 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

pending triage
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 lowercased c:)
  • Run vitest
System Info
vitest/4.0.18 win32-x64 node-v24.13.0
Used Package Manager

yarn

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.