globalSetup script is executed with wrong CWD #6706
Labels
feat: workspace
Issues and PRs related to the workspace feature
p2-to-be-discussed
Enhancement under consideration (priority)
pending triage
Describe the bug
When using
vitest.workspace.ts
file in a monorepo, theglobalSetup
script is executed with the CWD set to the monorepo root rather than the package root.The
vite.config.ts
is correctly executed with the package root as CWD.Reproduction
https://stackblitz.com/~/github.com/maxpatiiuk/vitest-wrong-dir
Clone this repository & install dependencies (or use Stackblitz):
git clone https://github.com/maxpatiiuk/vitest-wrong-cwd cd vite-wrong-cwd npm install
Run
npx vitest run
from monorepo root. See that thevite.config.ts
is correctly executed with CWD set to package root. At the same time,globalSetup
script is unexpectedly executed with CWD set to the monorepo root.System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: