Commit f5114b4
committed
refactor(engine): drop the unreachable comparator arm in canonicalizeCase
codecov/patch held at 97.29% on this file under the `engine` flag: one line, the
sort comparator's equality arm. It is genuinely unreachable -- Object.keys yields
each key exactly once, so a comparator never sees two equal keys -- and the
`v8 ignore` pragma covering it was flag-dependent: vitest's v8 provider honoured
it, the engine package's own coverage run did not.
Rather than chase pragmas across two coverage tools, the branch is gone. Sorting
the keys with the default comparator gives the identical total order for strings,
so the freeze point does not move -- which is not an assertion, it is what the
pinned pre-move digest in both test suites verifies.
An unreachable branch can only sit uncovered or carry an ignore comment; not
writing one beats both.1 parent 04b52b6 commit f5114b4
1 file changed
Lines changed: 8 additions & 5 deletions
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
0 commit comments