Closed elsaperelli closed 1 year ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π’ | Statements | 85.71% (-0.08% π») |
1938/2261 |
π‘ | Branches | 73.75% (-0.13% π») |
1711/2320 |
π’ | Functions | 88.72% (-0.23% π») |
346/390 |
π’ | Lines | 85.96% (-0.07% π») |
1868/2173 |
349 tests passing in 28 suites.
Report generated by π§ͺjest coverage report action from ccdb05a13c41a2518fcc053464371a63ed6aba61
Summary
Before, the coverage highlighting only happened for one measure group. Now, it calculates the coverage for all patients for each individual group.
New behavior
generateClauseCoverageHTML
now returns a lookup object where the key is the groupId and the value is the clause coverage html for that group. There is an additional property on the CalculationOutput interface forgroupClauseCoverageHTML
.Code changes
src/calculation/Calculator.ts
- The lookup object created bygenerateClauseCoverageHTML
is now returned as part of the CalculationOutput in thecalculate
function. If the debug output is enabled, an html file for the overall clause coverage html is created and contains the html for each group. In addition, an html file is created for each of the groups clause coverage html.src/Calculation/HTMLBuilder.ts
-generateClauseCoverageHtml
iterates through each execution result and adds the detailedResult to a lookup object where the key is its corresponding groupId. Then, it iterates through that lookup object and calculates the clauseCoverageHtml for each of the groups in that lookup object. The html for each group is added to another lookup object where the key is the groupId and the value is the clause coverage html for that group. That lookup object is then returned.src/types/Calculator.ts
- The optionalgroupClauseCoverageHTML
property was added to theCalculationOutput
interface.test/HTMLGenerator.test.ts
- Tests were changed to reflect the changes to the return type ofgenerateClauseCoverageHTML
.test/fixtures/html/SimpleCoverageAnnotation.html
- This file was modified to include the group name.test/fixtures/html/SimpleCoverageAnnotation2.html
- This file was added for the unit test that testsgenerateClauseCoverageHTML
on multiple groups.Testing guidance
npm run check
to ensure that unit tests pass and there are no prettier or lint errors/warnings.npm run cli -- detailed -m <path-to-measure-bundle.json> -p <path-to-pt1.json> <path-to-pt2.json> -o --debug
coverage-test-case.zip