(ir: SemanticIR)
| 597 | } |
| 598 | |
| 599 | function testsSection(ir: SemanticIR): TwinSection { |
| 600 | const rows: TwinRow[] = ir.tests.value.map((test, index) => ({ |
| 601 | id: `test-${index}`, |
| 602 | label: test.name, |
| 603 | detail: locationLabel(test.file, test.line), |
| 604 | target: test.file ? refAt(test.file, test.line, test.name) : undefined, |
| 605 | factPath: `tests[${index}]` |
| 606 | })); |
| 607 | return { |
| 608 | name: 'tests', |
| 609 | title: SECTION_TESTS, |
| 610 | subject: SUBJECT_TESTS, |
| 611 | state: ir.tests.state, |
| 612 | factPath: 'tests', |
| 613 | text: rows.length > 0 ? testCallerCount(rows.length) : undefined, |
| 614 | rows, |
| 615 | // Never "not tested": this is a search through callers that found none. |
| 616 | emptyText: TESTS_EMPTY_INFERRED, |
| 617 | populated: rows.length > 0 |
| 618 | }; |
| 619 | } |
| 620 | |
| 621 | /** |
| 622 | * The runtime facet, once a recording has been imported. |
no test coverage detected