( args: CompareReportsArgs, newIssues: SourceFileIssue[] | undefined, )
| 259 | } |
| 260 | |
| 261 | export async function saveDiffFiles( |
| 262 | args: CompareReportsArgs, |
| 263 | newIssues: SourceFileIssue[] | undefined, |
| 264 | ) { |
| 265 | const { |
| 266 | project, |
| 267 | ctx, |
| 268 | env: { settings }, |
| 269 | currReport, |
| 270 | prevReport, |
| 271 | config, |
| 272 | } = args; |
| 273 | |
| 274 | const diffFiles = persistedFilesFromConfig(config, { |
| 275 | directory: ctx.directory, |
| 276 | isDiff: true, |
| 277 | }); |
| 278 | |
| 279 | return { |
| 280 | name: projectToName(project), |
| 281 | files: { |
| 282 | current: currReport.files, |
| 283 | previous: prevReport.files, |
| 284 | comparison: await saveOutputFiles({ |
| 285 | project, |
| 286 | type: 'comparison', |
| 287 | files: diffFiles, |
| 288 | settings, |
| 289 | }), |
| 290 | }, |
| 291 | ...(newIssues && { newIssues }), |
| 292 | } satisfies ProjectRunResult; |
| 293 | } |
| 294 | |
| 295 | export async function saveReportFiles<T extends 'current' | 'previous'>(args: { |
| 296 | project: Pick<ProjectConfig, 'name'> | null; |
no test coverage detected