@@ -4,7 +4,7 @@ import type { ErrorWithDiff, File, Reporter, Task, TaskResultPack, UserConsoleLo
44import { clearInterval , getFullName , getSuites , getTests , getTypecheckTests , hasFailed , hasFailedSnapshot , isNode , relativePath , setInterval } from '../../utils'
55import type { Vitest } from '../../node'
66import { F_RIGHT } from '../../utils/figures'
7- import { divider , formatTimeString , getStateString , getStateSymbol , pointer , renderSnapshotSummary } from './renderers/utils'
7+ import { divider , formatProjectName , formatTimeString , getStateString , getStateSymbol , pointer , renderSnapshotSummary } from './renderers/utils'
88
99const BADGE_PADDING = ' '
1010const HELP_HINT = `${ c . dim ( 'press ' ) } ${ c . bold ( 'h' ) } ${ c . dim ( ' to show help' ) } `
@@ -39,7 +39,6 @@ export abstract class BaseReporter implements Reporter {
3939
4040 onInit ( ctx : Vitest ) {
4141 this . ctx = ctx
42-
4342 ctx . logger . printBanner ( )
4443 this . start = performance . now ( )
4544 }
@@ -321,11 +320,12 @@ export abstract class BaseReporter implements Reporter {
321320 for ( const [ error , tasks ] of errorsQueue ) {
322321 for ( const task of tasks ) {
323322 const filepath = ( task as File ) ?. filepath || ''
323+ const projectName = ( task as File ) ?. projectName || task . file ?. projectName
324324 let name = getFullName ( task )
325325 if ( filepath )
326326 name = `${ name } ${ c . dim ( `[ ${ this . relative ( filepath ) } ]` ) } `
327327
328- this . ctx . logger . error ( `${ c . red ( c . bold ( c . inverse ( ' FAIL ' ) ) ) } ${ name } ` )
328+ this . ctx . logger . error ( `${ c . red ( c . bold ( c . inverse ( ' FAIL ' ) ) ) } ${ formatProjectName ( projectName ) } ${ name } ` )
329329 }
330330 await this . ctx . logger . printError ( error )
331331 errorDivider ( )
0 commit comments