-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(vite): exit from test if no files found #27722
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit daa3408. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targets
Sent with 💌 from NxCloud. |
1838ac4
to
fd1b9ea
Compare
fd1b9ea
to
daa3408
Compare
I'm facing the same problem, regardless of passing checked out the branch and it solved the problem. I am still getting into the console from Vitest the following, but not an issue for me
|
exiting with code 0 means it finished successfully, I think it's fine to have it |
@AliYusuf95 understood, to clarify I have no problem with that at all, my main concern is that it has been stuck when no test is found |
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior After running `nx test project` or `nx run-many -t test` with no test files with `@nx/vite:test` plugin, vitest process exit directly but nx reporter keep waiting for finish notification which cause to waiting indefinitely. vitest reference: https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/core.ts#L409-L413 https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/cli/cli-api.ts#L102-L116 console log example: ```bash nx test project > nx run project:test RUN v2.0.5 /path/to/project include: src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx} exclude: **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.* No test files found, exiting with code 0 ``` ```bash nx run-many -t test --no-cache -p project NX Running target test for project project With additional flags: --cache=false → Executing 1/1 remaining tasks... ⠹ nx run project:test ``` ## Expected Behavior `nx test project` should exit directly in case vitest process exit early. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # (cherry picked from commit 2546082)
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
After running
nx test project
ornx run-many -t test
with no test files with@nx/vite:test
plugin, vitest process exit directly but nx reporter keep waiting for finish notification which cause to waiting indefinitely.vitest reference:
https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/core.ts#L409-L413
https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/cli/cli-api.ts#L102-L116
console log example:
Expected Behavior
nx test project
should exit directly in case vitest process exit early.Related Issue(s)
Fixes #