@@ -34,6 +34,7 @@ import { VitestPackageInstaller } from './packageInstaller'
3434import { createPool } from './pool'
3535import { TestProject } from './project'
3636import { BlobReporter , readBlobs } from './reporters/blob'
37+ import { HangingProcessReporter } from './reporters/hanging-process'
3738import { createBenchmarkReporters , createReporters } from './reporters/utils'
3839import { VitestSpecifications } from './specifications'
3940import { StateManager } from './state'
@@ -564,8 +565,6 @@ export class Vitest {
564565 // Report coverage for uncovered files
565566 await this . reportCoverage ( coverage , true )
566567
567- this . logger . printNoTestFound ( filters )
568-
569568 if ( throwAnError ) {
570569 throw new FilesNotFoundError ( this . mode )
571570 }
@@ -671,11 +670,6 @@ export class Vitest {
671670 }
672671
673672 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 ( ) ) )
679673 await this . _testRun . start ( specs )
680674
681675 // previous run
@@ -1140,7 +1134,7 @@ export class Vitest {
11401134 this . state . getProcessTimeoutCauses ( ) . forEach ( cause => console . warn ( cause ) )
11411135
11421136 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
11441138
11451139 if ( runningServers === 1 ) {
11461140 console . warn ( 'Tests closed successfully but something prevents Vite server from exiting' )
@@ -1152,7 +1146,9 @@ export class Vitest {
11521146 console . warn ( 'Tests closed successfully but something prevents the main process from exiting' )
11531147 }
11541148
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+ }
11561152 }
11571153
11581154 process . exit ( )
0 commit comments