You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 509f92c
Browse filesBrowse the repository at this point in the historyBrowse files
test(webview): spy the profile and modes methods instead of suppressing the manager swaps
The view-state tests replaced whole managers on a readonly field, and every one of those assignments needed a
@ts-ignore: ten of them, at the profile-lookup helper, the failing-lookup and superseded-view cases, the
empty-custom-modes and resetCustomModes cases, the profile-store save paths and the write-ownership case. The
methods they stub are public on both managers, so the stubs now go on the methods with vi.spyOn and the
directives go away: 17 suppression directives in the file, 7 left, all seven pre-existing and outside this
PR's diff. The profile-lookup helper's stalled profile is now typed from the manager's own resolved type -
Awaited<ReturnType<ProviderSettingsManager["getProfile"]>> - so the stubs are checked against the real
signature with no assertion and no directive; keeping id optional there is deliberate, because the doubles
omit it today and the load path strips name and keeps the rest as the buffered apiConfiguration, so an id
that the doubles do not supply would show up in what those tests assert.
Diff: one file, 34 insertions, 39 deletions. 39 deleted lines are 10 directives, the ten replacement-object
blocks and the hand-written profile fields; not one deleted line is an it(...) or an expect(...), so this is
deleted-duplicate 0 and deleted-coverage 0. Test-only: it contributes no changed executable lines to the
mutation-diff buckets.
Two controls, run rather than described. Remove the getProfile spy that the profile-lookup helper installs and
core/webview goes red: Test Files 1 failed | 33 passed (34), Tests 5 failed | 962 passed (967) - the helper
stub is load-bearing. Remove the three profile-store stubs on the saver manager in the two sibling-overlay
cases and the suite stays green: 34 files, 967 tests. That is a real finding rather than a clean bill: those
three stubs are not what makes those two cases pass today - the real manager against the mocked memento
produces the same viewLocalState - so they are kept as isolation of intent, not sold as coverage, and the
question of whether those cases should assert on the store calls at all is a question for the reviewer rather
than something to hide behind a green run. With the stubs restored: 34 files, 967 tests, 0 failures; tsc
-p . --noEmit exit 0; eslint --max-warnings=0 --no-warn-ignored on the file exit 0; prettier --check exit 0.
Two tool artefacts measured on the way. eslint --prune-suppressions rewrote src/eslint-suppressions.json with
1441 added and 1441 removed lines, dropping entries for files outside this diff (anthropic-vertex.spec.ts and
others); the spec's own count stayed 195, so the pruning was unrelated cleanup and the file was reverted to
HEAD rather than shipped as a side effect of checking one file. And my inserted listConfig stub exceeded the
print width, so the edited file genuinely failed prettier --check while the HEAD copy of the same file passed
it: formatting was applied and the gates re-run, which is the difference between a file that needed work and
the junction worktree's whole-tree prettier noise.
Review row: database id 4477029124 (Trivial, Maintainability & Code Quality).
0 commit comments