(project: TestProject, files: File[] = [])
| 143 | } |
| 144 | |
| 145 | collectFiles(project: TestProject, files: File[] = []): void { |
| 146 | files.forEach((file) => { |
| 147 | const existing = this.filesMap.get(file.filepath) || [] |
| 148 | const otherFiles = existing.filter( |
| 149 | i => i.projectName !== file.projectName || i.meta.typecheck !== file.meta.typecheck, |
| 150 | ) |
| 151 | const currentFile = existing.find( |
| 152 | i => i.projectName === file.projectName, |
| 153 | ) |
| 154 | // keep logs for the previous file because it should always be initiated before the collections phase |
| 155 | // which means that all logs are collected during the collection and not inside tests |
| 156 | if (currentFile) { |
| 157 | file.logs = currentFile.logs |
| 158 | } |
| 159 | otherFiles.push(file) |
| 160 | this.filesMap.set(file.filepath, otherFiles) |
| 161 | this.updateId(file, project) |
| 162 | }) |
| 163 | } |
| 164 | |
| 165 | clearFiles( |
| 166 | project: TestProject, |
no test coverage detected