Commit 55eabdd
committed
test(bench): cover the RenderBenchPage delegator; drop an unreachable branch
codecov/patch flagged benchpage.go at 90.24%. Two fixes bring it to 100%:
- The happy-path test now calls the package-level RenderBenchPage (the
public API) rather than the method, so the delegator's success path is
covered within this package's own coverage profile (the CLI test that
exercised it lives in a different package).
- githubURLForRelativeTarget's `if rel == ""` guard was unreachable: the
leading-'#' check above it means any '#' found sits at index >= 1, so
rel is never empty after the split. Removed it (a defensive branch must
be drivable red/green) and noted the invariant in a comment.1 parent 34e1aa9 commit 55eabdd
2 files changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 86 | + | |
| 87 | + | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
0 commit comments