@@ -70,8 +70,8 @@ async function parseFile(file: string, projectTokenDictionaryStrs: string[]) {
70
70
const data : string = fs . readFileSync ( file , 'utf8' ) ;
71
71
const parser = new XMLParser ( { allowBooleanAttributes : true , ignoreAttributes : false , attributeNamePrefix : '' } ) ;
72
72
const report = parser . parse ( data ) as Partial < JUnitReport > ;
73
- const testsuites = castArray ( report ?. testsuite || report . testsuites ?. testsuite ) ;
74
- return Promise . all ( testsuites . map ( async testsuite => parseSuite ( file , projectTokenDictionaryStrs , testsuite ) ) ) ;
73
+ const testsuites = castArray ( report ?. testsuite || report ? .testsuites ?. testsuite ) ;
74
+ return Promise . all ( testsuites . map ( async ( testsuite : JUnitSuite | undefined ) => parseSuite ( file , projectTokenDictionaryStrs , testsuite ) ) ) ;
75
75
}
76
76
77
77
async function parseSuite ( fileName : string , projectTokenDictionaryStrs : string [ ] , testsuite ?: JUnitSuite ) {
@@ -128,7 +128,7 @@ export async function parseTestReports(checkName: string, summary: string, repor
128
128
if ( totalCount === 0 ) {
129
129
continue ;
130
130
}
131
- const failed = annotations . filter ( an => an . annotation_level !== 'notice' ) . length ;
131
+ const failed = annotations . filter ( ( an : { annotation_level : string ; } ) => an . annotation_level !== 'notice' ) . length ;
132
132
const passed = totalCount - failed - skipped ;
133
133
testResults . push ( {
134
134
summary,
@@ -147,7 +147,7 @@ export async function parseTestReports(checkName: string, summary: string, repor
147
147
return testResults ;
148
148
}
149
149
150
- class NoTestsFoundError extends Error { }
150
+ class NoTestsFoundError extends Error { }
151
151
152
152
export async function getTestReports ( inputs : Readonly < ReturnType < typeof parseInputs > > ) {
153
153
core . startGroup ( `📦 Process test results` ) ;
@@ -156,7 +156,7 @@ export async function getTestReports(inputs: Readonly<ReturnType<typeof parseInp
156
156
core . info ( `Retrieved ${ reportsCount } report globs/files to process.` ) ;
157
157
158
158
const allResults = await Promise . all (
159
- inputs . reportPaths . map ( async ( _ , i ) =>
159
+ inputs . reportPaths . map ( async ( _ : any , i : any ) =>
160
160
parseTestReports (
161
161
retrieve ( 'checkName' , inputs . checkName , i , reportsCount ) ,
162
162
retrieve ( 'summary' , inputs . summary , i , reportsCount ) ,
0 commit comments