Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vitest does not discover tests in workspaces #6354

Closed
6 tasks done
ufr-scf opened this issue Aug 16, 2024 · 0 comments · Fixed by #6369
Closed
6 tasks done

Vitest does not discover tests in workspaces #6354

ufr-scf opened this issue Aug 16, 2024 · 0 comments · Fixed by #6369

Comments

@ufr-scf
Copy link

ufr-scf commented Aug 16, 2024

Describe the bug

Vitest does not discover test suites in test files located in workspaces. This only happens when the workspace has it's own installation of vitest, i.e. is not referenced as an npm workspace in the root package.json.

Reproduction

https://github.com/ufr-scf/vitest-monorepo-bug

System Info

System:
    OS: Linux 5.15 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 4.01 GB / 7.61 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 22.5.1 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 9.6.0 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    vitest: ^2.0.5 => 2.0.5

Used Package Manager

npm

Validations

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant