@@ -34,6 +34,7 @@ import { VitestPackageInstaller } from './packageInstaller'
34
34
import { createPool } from './pool'
35
35
import { TestProject } from './project'
36
36
import { BlobReporter , readBlobs } from './reporters/blob'
37
+ import { HangingProcessReporter } from './reporters/hanging-process'
37
38
import { createBenchmarkReporters , createReporters } from './reporters/utils'
38
39
import { VitestSpecifications } from './specifications'
39
40
import { StateManager } from './state'
@@ -564,8 +565,6 @@ export class Vitest {
564
565
// Report coverage for uncovered files
565
566
await this . reportCoverage ( coverage , true )
566
567
567
- this . logger . printNoTestFound ( filters )
568
-
569
568
if ( throwAnError ) {
570
569
throw new FilesNotFoundError ( this . mode )
571
570
}
@@ -671,11 +670,6 @@ export class Vitest {
671
670
}
672
671
673
672
private async runFiles ( specs : TestSpecification [ ] , allTestsRun : boolean ) : Promise < TestRunResult > {
674
- const filepaths = specs . map ( spec => spec . moduleId )
675
- this . state . collectPaths ( filepaths )
676
-
677
- await this . report ( 'onPathsCollected' , filepaths )
678
- await this . report ( 'onSpecsCollected' , specs . map ( spec => spec . toJSON ( ) ) )
679
673
await this . _testRun . start ( specs )
680
674
681
675
// previous run
@@ -1140,7 +1134,7 @@ export class Vitest {
1140
1134
this . state . getProcessTimeoutCauses ( ) . forEach ( cause => console . warn ( cause ) )
1141
1135
1142
1136
if ( ! this . pool ) {
1143
- const runningServers = [ this . vite , ...this . resolvedProjects . map ( p => p . vite ) ] . filter ( Boolean ) . length
1137
+ const runningServers = [ this . _vite , ...this . resolvedProjects . map ( p => p . _vite ) ] . filter ( Boolean ) . length
1144
1138
1145
1139
if ( runningServers === 1 ) {
1146
1140
console . warn ( 'Tests closed successfully but something prevents Vite server from exiting' )
@@ -1152,7 +1146,9 @@ export class Vitest {
1152
1146
console . warn ( 'Tests closed successfully but something prevents the main process from exiting' )
1153
1147
}
1154
1148
1155
- console . warn ( 'You can try to identify the cause by enabling "hanging-process" reporter. See https://vitest.dev/config/#reporters' )
1149
+ if ( ! this . reporters . some ( r => r instanceof HangingProcessReporter ) ) {
1150
+ console . warn ( 'You can try to identify the cause by enabling "hanging-process" reporter. See https://vitest.dev/config/#reporters' )
1151
+ }
1156
1152
}
1157
1153
1158
1154
process . exit ( )
0 commit comments