-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the bug
I am using a monorepo with multiple subpackages. To manage this, I am using vitest, with a configuration at the project root which defines each package as a project. When I run tests (vitest run) from the project root, the non-browser tests run correctly, but browser tests sometimes do not appear and cause the test run to hang. This problem is inconsistent, and usually happens on the first run or after deleting the .vite folder in node_modules (though it can happen other times as well). With a larger number of tests in a non-minimal case I have noticed that sometimes only a few browser tests will be missing at once.
When running vitest run from any of the packages directly, all tests in that package (even browser tests) are executed correctly without fail.
This seems very similar to #3363 which was supposedly closed.
Reproduction
This repo serves as a minimal reproduction: https://github.com/Andrei486/vitest-project-repro.
System Info
System:
OS: macOS 14.8.2
CPU: (16) arm64 Apple M3 Max
Memory: 13.93 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.19.4 - /opt/homebrew/opt/node@20/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.8.2 - /opt/homebrew/opt/node@20/bin/npm
pnpm: 9.12.3 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 142.0.7444.176
Safari: 17.6
npmPackages:
@vitest/browser-playwright: latest => 4.0.15
vitest: latest => 4.0.15Used Package Manager
pnpm
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.