()
| 307 | }, |
| 308 | |
| 309 | tests() { |
| 310 | let sortFunc = this.runConfig.sortBy === 'name' |
| 311 | ? (a, b) => a.name.localeCompare(b.name) |
| 312 | : (a, b) => { |
| 313 | if (a.summary === 'markedAsExpected' && b.summary !== 'markedAsExpected') { |
| 314 | return -1; |
| 315 | } |
| 316 | if (a.summary !== 'markedAsExpected' && b.summary === 'markedAsExpected') { |
| 317 | return 1; |
| 318 | } |
| 319 | if (a.actualErrors.length === b.actualErrors.length) { |
| 320 | if (a.percentage === b.percentage) { |
| 321 | return a.name.localeCompare(b.name); |
| 322 | } |
| 323 | else { |
| 324 | return a.percentage - b.percentage; |
| 325 | } |
| 326 | } |
| 327 | return b.actualErrors.length - a.actualErrors.length; |
| 328 | }; |
| 329 | |
| 330 | if (!this.searchString) { |
| 331 | // Not modify the original tests data. |
| 332 | return this.fullTests.slice().sort(sortFunc); |
| 333 | } |
| 334 | |
| 335 | let searchString = this.searchString.toLowerCase(); |
| 336 | return this.fullTests.filter(test => { |
| 337 | return test.name.toLowerCase().match(searchString); |
| 338 | }).sort(sortFunc); |
| 339 | }, |
| 340 | |
| 341 | selectedTests() { |
| 342 | // Only run visible tests. |
nothing calls this directly
no test coverage detected
searching dependent graphs…