1- import type { File , TestAnnotation } from '@vitest/runner'
1+ import type { TestAnnotation } from '@vitest/runner'
22import type { SerializedError } from '@vitest/utils'
33import type { Vitest } from '../core'
44import type { TestProject } from '../project'
@@ -9,7 +9,6 @@ import { stripVTControlCharacters } from 'node:util'
99import { getFullName , getTasks } from '@vitest/runner/utils'
1010import { deepMerge } from '@vitest/utils/helpers'
1111import { relative } from 'pathe'
12- import { capturePrintError } from '../printError'
1312import { noun } from './renderers/utils'
1413
1514export interface GithubActionsReporterOptions {
@@ -127,7 +126,6 @@ export class GithubActionsReporter implements Reporter {
127126 project : TestProject
128127 title : string
129128 error : unknown
130- file ?: File
131129 } > ( )
132130 for ( const error of errors ) {
133131 projectErrors . push ( {
@@ -150,15 +148,14 @@ export class GithubActionsReporter implements Reporter {
150148 project,
151149 title : project . name ? `[${ project . name } ] ${ title } ` : title ,
152150 error,
153- file,
154151 } )
155152 }
156153 }
157154 }
158155
159156 // format errors via `printError`
160- for ( const { project, title, error, file } of projectErrors ) {
161- const result = capturePrintError ( error , this . ctx , { project, task : file } )
157+ for ( const { project, title, error } of projectErrors ) {
158+ const result = this . ctx . logger . formatError ( error , { project } )
162159 const stack = result ?. nearest
163160 if ( ! stack ) {
164161 continue
0 commit comments