Commit 0472cdf
committed
refactor: improve TIR/MAGE internals and achieve 100% coverage
TIR Enhanced:
- Extract estimateReadingInterval() helper function
- Extract validateNormalizedReadings() helper function
- Extract getPopulationGoals() helper function
- Add NormalizedReading type for better type safety
- Add BOUNDARY_EPSILON constant
- Fix c8 ignore positioning for defensive code blocks
- Add @category JSDoc tags
MAGE:
- Fix c8 ignore for minVal comparison edge case
- Remove unused error parameter from catch block
Tests:
- Add test for invalid mmol/L glucose validation
- Update to use shared test constants
Index:
- Export new enhanced TIR functions
Coverage: 100% statements, branches, functions, lines
BREAKING CHANGE: None (internal refactoring only)1 parent 1ed580c commit 0472cdf
File tree
4 files changed
+1539
-2
lines changed- src
- tests
4 files changed
+1539
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
262 | 263 | | |
263 | | - | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
0 commit comments