<!-- 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(vite): must begin with lowercase` --> ## Current Behavior Running `nx test … --reporter=verbose` (or any additional Vitest reporter) on projects that use **Vitest ≥ 0.29** hangs indefinitely at the end of the run. `vitest` itself finishes, but the Nx task-runner never receives the *done* signal because **`NxReporter` only implements the legacy `onFinished()` hook**. When multiple reporters are configured, Vitest now emits `onTestRunEnd()` instead of `onFinished()`, so the promise in `NxReporter` remains unresolved and the worker process stays alive forever. ## Expected Behavior `nx test` (and affected `nx run-many --target=test`) exits cleanly on **all** Vitest versions, regardless of how many reporters are passed. * `NxReporter` resolves its internal promise via **either** `onTestRunEnd` (Vitest ≥ 0.29) **or** `onFinished` (Vitest ≤ 0.28). * No functional change in watch-mode. * No extra timers or fallbacks – just one shared helper. ## Implementation Notes * Added `onTestRunEnd` method that delegates to a private `_handleFinished`. * Re-implemented `onFinished` as a thin delegate to the same helper. * Original error-detection logic is untouched. ## Related Issue(s) Closes nrwl/nx#<insert-issue-number-if/when-one-exists> Co-authored-by: Paul Bohm <{{GITHUB_NOREPLY_EMAIL}}>
{{links}}
Nx: Smart Repos · Fast Builds
An AI-first build platform that connects everything from your editor to CI. Helping you deliver fast, without breaking things.
This package is a Vite plugin for Nx.
{{content}}