Commit 2121f01
committed
test: push coverage to 97.8% lines / 90.3% branches / 96.6% functions
+38 tests across three batches that fill the long-tail gaps:
Helper-function branches:
- Reflog relativeTime: hours / days / months / years / invalid-date
branches (was only the minute branch); plus Escape-with-empty-query
blurring the input
- ActivityLog formatDuration: ms vs s branches
- BisectBanner culpritAuthor: Author: line present / missing — derived
value not currently displayed but still runs
- md5: 2-byte UTF-8 (Latin-1 supplement), surrogate pair (emoji,
4-byte UTF-8), and mixed-input branches
UI edge cases:
- ContextMenu: top-level + child item icon rendering; viewport-edge
clamping (right overflow → adjustedX, bottom overflow → adjustedY);
submenu flips to on-left when right would overflow. Stubs
Element.prototype.getBoundingClientRect for the test duration so the
$effect sees the overflowing dimensions on its first run.
- SearchBar: Enter with empty query → clear(); Escape closes the
branch-filter dropdown without clearing the search query
git-service edge cases:
- stashList swallows errors and returns []
- log() stash insertion: parent in scope (splice), parent out of scope
with no filter (unshift), parent out of scope with branch filter
(drop), stash log exec failure (warn + continue)
- log() uncommitted porcelain: staged/unstaged/untracked counting,
empty porcelain (no UNCOMMITTED entry), porcelain exec failure
- log() arg construction: sortOrder topological/date/author-date
branches, --max-count / --skip / remoteFilter glob list / branch
positional arg / unsafe-ref rejection
Earlier-but-uncommitted rounds bundled here too: integration test
timeout bump (testTimeout/hookTimeout 5s → 30s) for slower CI runners
on the flow/lfs/submodule tests; defensive ?? '' fallback tests for
parsers; repo-discovery cache + error-path tests.1 parent ebac9d5 commit 2121f01
14 files changed
Lines changed: 1301 additions & 12 deletions
File tree
- src
- git/__tests__
- services/__tests__
- webview-ui/src
- __tests__
- components
- commit/__tests__
- common/__tests__
- layout/__tests__
- lib/utils/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
175 | 289 | | |
176 | 290 | | |
177 | 291 | | |
| |||
0 commit comments