We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vitest-dev
sheremet-va
antfu
patak-dev
Learn more about funding links in repositories.
Report abuse
1 parent 5d7463e commit 9814124Copy full SHA for 9814124
packages/vitest/src/node/core.ts
@@ -160,10 +160,14 @@ export class Vitest {
160
checker.onParseEnd(async ({ files, sourceErrors }) => {
161
this.state.collectFiles(checker.getTestFiles())
162
await this.report('onCollected')
163
- if (!files.length)
+ if (!files.length) {
164
this.logger.printNoTestFound()
165
- else
+ }
166
+ else {
167
+ if (hasFailed(files))
168
+ process.exitCode = 1
169
await this.report('onFinished', files)
170
171
if (sourceErrors.length && !this.config.typecheck.ignoreSourceErrors) {
172
process.exitCode = 1
173
await this.logger.printSourceTypeErrors(sourceErrors)
0 commit comments