Repository navigation
Commit b0567c5
committed
test(usage): pin the malformed-counter warning and drop a dead fallback
What: make the alias path a required argument of asTokenCount, add a spec
case that pins the warning message and the exact field names it reports, and
document why the typeof guard stays in isTokenCount.
Why: mutation testing on the helper left four surviving StringLiteral mutants
and one NoCoverage mutant on the `path ?? "unknown"` fallback. The fallback
was unreachable because every caller passes an alias, and the warning text
and field names were unpinned, so a future edit could silently rename the
diagnostic that makes a billing regression visible.
Impact: no behavior change for valid or malformed counters. The diagnostic is
now covered by a test. Mutation score on the helper: 65 killed, 1 survived
(provably equivalent typeof guard), 0 no-coverage.1 parent 65f6249 commit b0567c5
2 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
216 | 238 | | |
217 | 239 | | |
218 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
117 | | - | |
| 121 | + | |
118 | 122 | | |
119 | | - | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| |||
0 commit comments