Skip to content

Commit

Permalink
fix(vite): do not stop the test process of failure in watch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jiri-prokop-pb committed Dec 9, 2024
1 parent 5d61191 commit 2f64b36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/executors/test/vitest.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function* vitestExecutor(
}

// vitest sets the exitCode in case of exception without notifying reporters
if (process.exitCode === undefined) {
if (process.exitCode === undefined || (watch && ctx.state.getFiles().length > 0)) {
for await (const report of nxReporter) {
// vitest sets the exitCode = 1 when code coverage isn't met
hasErrors =
Expand Down

0 comments on commit 2f64b36

Please sign in to comment.