@internal
(files: string[] = this.state.getFilepaths(), trigger?: string, allTestsRun = true, resetTestNamePattern = false)
| 1195 | |
| 1196 | /** @internal */ |
| 1197 | async rerunFiles(files: string[] = this.state.getFilepaths(), trigger?: string, allTestsRun = true, resetTestNamePattern = false): Promise<TestRunResult> { |
| 1198 | if (resetTestNamePattern) { |
| 1199 | this.configOverride.testNamePattern = undefined |
| 1200 | } |
| 1201 | |
| 1202 | if (this.filenamePattern) { |
| 1203 | const filteredFiles = await this.globTestSpecifications(this.filenamePattern) |
| 1204 | files = files.filter(file => filteredFiles.some(f => f.moduleId === file)) |
| 1205 | } |
| 1206 | |
| 1207 | const specifications = files.flatMap(file => this.getModuleSpecifications(file)) |
| 1208 | await Promise.all([ |
| 1209 | this.report('onWatcherRerun', files, trigger), |
| 1210 | ...this._onUserTestsRerun.map(fn => fn(specifications)), |
| 1211 | ]) |
| 1212 | const testResult = await this.runFiles(specifications, allTestsRun) |
| 1213 | |
| 1214 | await this.report('onWatcherStart', this.state.getFiles(files)) |
| 1215 | return testResult |
| 1216 | } |
| 1217 | |
| 1218 | /** @internal */ |
| 1219 | async rerunTask(id: string): Promise<void> { |
no test coverage detected