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

root field is not appended to include paths. #402

Closed
4 tasks done
rtvu opened this issue May 29, 2024 · 0 comments · Fixed by #409
Closed
4 tasks done

root field is not appended to include paths. #402

rtvu opened this issue May 29, 2024 · 0 comments · Fixed by #409

Comments

@rtvu
Copy link

rtvu commented May 29, 2024

Describe the bug

Extension does not use the root field in vite.config.js. Extension assumes that root is the project's root folder.

If root is defined to be ./src, then on the command line, vitest will only see test files under ./src. However, the extension looks for all files within the project's root which can be outside of ./src.

Reproduction

https://github.com/rtvu/vitest-ext

Output

[INFO 6:10:57 AM] [v0.10.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 6:10:57 AM] [API] Running Vitest: v1.6.0 (vite.config.js)
[INFO 6:10:57 AM] [API] Starting Vitest process with Node.js: /home/user/.nvm/versions/node/v20.14.0/bin/node
[INFO 6:10:57 AM] [API] Vitest process 1065 created
[INFO 6:11:03 AM] [API] Collecting tests: should-not-see.test.js, src/should-see.test.js
[INFO 6:11:09 AM] Running all tests in workspace

Version

v0.10.7

Validations

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