previously, vite-jest assumed process.cwd() would contain node_modules
in workspace environments, a parent directory may contain node_modules
now, vite-jest will work in either setup
my project setup looks like:
package.json
node_modules
workspace-a
package.json
if workspace-a/package.json had a test script vite-jest and was run from the root (i.e. npm run test --workspace workspace-a), it would attempt to write to workspace-a/node_modules/vite/dist/client which did not exist. now, it will correctly write to node_modules/vite/dist/client even though process.cwd() is workspace-a.
previously, vite-jest assumed process.cwd() would contain node_modules in workspace environments, a parent directory may contain node_modules now, vite-jest will work in either setup
my project setup looks like:
if
workspace-a/package.json
had a test scriptvite-jest
and was run from the root (i.e.npm run test --workspace workspace-a
), it would attempt to write toworkspace-a/node_modules/vite/dist/client
which did not exist. now, it will correctly write tonode_modules/vite/dist/client
even thoughprocess.cwd()
isworkspace-a
.