Repository navigation
Commit 0a77cf8
committed
test(webview): cover both halves of the sibling task-handler rebuild selector
The rebuild that applies a saved profile's settings to a running task is keyed on the task's
own profile name rather than on the view's pin (ClineProvider.ts:2897-2902), and the case at this
file's :6365 that the review row pointed at covers the overlay refresh, not that selector. Two
cases now cover it: a sibling whose task follows the saved profile, whose handler rebuild is
asserted with the settings and with forceRebuild: true and exactly once, and a sibling whose task
follows another profile, whose rebuild is asserted not to happen at all. The rebuild itself is
stubbed so the case asserts the call and its options rather than the internals of a handler
build; the one assertion-free cast is there because updateTaskApiHandlerIfNeeded is private and
vi.spyOn needs the object and the key together, which the private-field alternative cannot give
it. The profile-store doubles are spies on the public methods (saveConfig, listConfig,
setModeConfig) rather than manager replacements, so this commit adds no suppression directive.
Controls, run rather than described. Change forceRebuild: true to false at the call site and the
matching case is the only failure in core/webview: Test Files 1 failed | 33 passed (34), Tests 1
failed | 955 passed (956), so the option is asserted rather than assumed. Comment the call line
out and the same case is the only failure again, so the rebuild call is what makes it pass rather
than the surrounding loop. The non-matching case stays green under both, which is its job. With
production restored: Test Files 34 passed (34), Tests 956 passed (956); tsc -p . --noEmit exit 0,
eslint --max-warnings=0 --no-warn-ignored on the file exit 0, prettier --check exit 0, and
src/eslint-suppressions.json untouched. Test-only, and __tests__ is one of the mutation gate's
excluded path segments (scripts/stryker-diff.mjs:85), so this adds nothing to the changed
executable-line bucket.
Review row: ClineProvider.spec.ts:6365 on this PR.1 parent 515cc02 commit 0a77cf8
1 file changed
Lines changed: 109 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6366 | 6366 | | |
6367 | 6367 | | |
6368 | 6368 | | |
| 6369 | + | |
| 6370 | + | |
| 6371 | + | |
| 6372 | + | |
| 6373 | + | |
| 6374 | + | |
| 6375 | + | |
| 6376 | + | |
| 6377 | + | |
| 6378 | + | |
| 6379 | + | |
| 6380 | + | |
| 6381 | + | |
| 6382 | + | |
| 6383 | + | |
| 6384 | + | |
| 6385 | + | |
| 6386 | + | |
| 6387 | + | |
| 6388 | + | |
| 6389 | + | |
| 6390 | + | |
| 6391 | + | |
| 6392 | + | |
| 6393 | + | |
| 6394 | + | |
| 6395 | + | |
| 6396 | + | |
| 6397 | + | |
| 6398 | + | |
| 6399 | + | |
| 6400 | + | |
| 6401 | + | |
| 6402 | + | |
| 6403 | + | |
| 6404 | + | |
| 6405 | + | |
| 6406 | + | |
| 6407 | + | |
| 6408 | + | |
| 6409 | + | |
| 6410 | + | |
| 6411 | + | |
| 6412 | + | |
| 6413 | + | |
| 6414 | + | |
| 6415 | + | |
| 6416 | + | |
| 6417 | + | |
| 6418 | + | |
| 6419 | + | |
| 6420 | + | |
| 6421 | + | |
| 6422 | + | |
| 6423 | + | |
| 6424 | + | |
| 6425 | + | |
| 6426 | + | |
| 6427 | + | |
| 6428 | + | |
| 6429 | + | |
| 6430 | + | |
| 6431 | + | |
| 6432 | + | |
| 6433 | + | |
| 6434 | + | |
| 6435 | + | |
| 6436 | + | |
| 6437 | + | |
| 6438 | + | |
| 6439 | + | |
| 6440 | + | |
| 6441 | + | |
| 6442 | + | |
| 6443 | + | |
| 6444 | + | |
| 6445 | + | |
| 6446 | + | |
| 6447 | + | |
| 6448 | + | |
| 6449 | + | |
| 6450 | + | |
| 6451 | + | |
| 6452 | + | |
| 6453 | + | |
| 6454 | + | |
| 6455 | + | |
| 6456 | + | |
| 6457 | + | |
| 6458 | + | |
| 6459 | + | |
| 6460 | + | |
| 6461 | + | |
| 6462 | + | |
| 6463 | + | |
| 6464 | + | |
| 6465 | + | |
| 6466 | + | |
| 6467 | + | |
| 6468 | + | |
| 6469 | + | |
| 6470 | + | |
| 6471 | + | |
| 6472 | + | |
| 6473 | + | |
| 6474 | + | |
| 6475 | + | |
| 6476 | + | |
| 6477 | + | |
6369 | 6478 | | |
6370 | 6479 | | |
6371 | 6480 | | |
| |||
0 commit comments