Closed elsaperelli closed 1 year ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π’ | Statements | 86.01% (+0.06% πΌ) |
2312/2688 |
π‘ | Branches | 73.02% (+0.05% πΌ) |
2130/2917 |
π’ | Functions | 89.12% (+0.02% πΌ) |
426/478 |
π’ | Lines | 86.35% (+0.07% πΌ) |
2233/2586 |
433 tests passing in 31 suites.
Report generated by π§ͺjest coverage report action from 1a5c44dbd8e8e5ef46147f4e030226c1b1e6538f
Summary
This is similar to Lauren's PR here where we sorted the statements into population statements, non-functions, and then function statements; however, now we also order the population statements in the following order:
...and then non-functions and function statements.
New behavior
Population expression statements are now sorted in the above order. This order is based on the following "egg":
Code changes
HTMLBuilder.ts
- I just added the sorting logic for the population expressions directly to thesortStatements
function. Rather than using thepopulationSet
, we now usepopulationIdentifiers
because it includes thecode
(which is always the same) and the criteria expression (which can be different) for each population. That way we can sort statements because on what code their statement name links to.HTMLBuilder.test.ts
- two new unit tests forsortStatements()
- one for a proportion boolean measure (checks ordering of ipp, denom, numer) and one for a cv boolean measure (checks for ordering of ipp, measure population, measure population exclusion, measure observation function).Testing guidance
npm run check
--debug
flag and inspected the html output in thedebug/html
directory.