Repository navigation
Conversation
Co-authored-by: Roomote <roomote@roomote.dev>
|
Author self-review summary:
Per initiative policy, not approving this Roomote-authored PR — leaving review to a human maintainer. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: Resolve the merge conflicts. The review sequence resumes after the branch is mergeable. Review-state labels are managed by this workflow; do not edit them manually. |
|
This PR has been awaiting author changes for 14 days and will be automatically closed in 7 days. Please address the review comments or leave a comment if you need more time. |
|
Closing due to author inactivity after requested changes. Feel free to reopen once the requested changes have been addressed. |
1 similar comment
|
Closing due to author inactivity after requested changes. Feel free to reopen once the requested changes have been addressed. |
|
This work continues in #2279 on the same branch ( |
Related GitHub Issue
N/A: Phase 4 test-utils rollout guardrails.
Description
Adds lightweight guardrails so the Phase 3 test-utils migration cannot regress, per the initiative plan's Phase 4:
src/eslint.config.mjs:no-restricted-syntaxerror onvi.clearAllMocks()/vitest.clearAllMocks()scoped to the converted extension lanes (api/providers/__tests__,core/config/__tests__,services/code-index/**/__tests__,integrations/terminal/**/__tests__), pointing authors atsrc/test-utils/reset.webview-ui/eslint.config.mjs:no-restricted-importserror on importingQueryClientProviderin component specs (src/components/**/__tests__/**/*.tsx), pointing authors atrenderWithExtensionState. Scoped to.tsxcomponent specs intentionally —.tshook specs keep localrenderHookwrappers because they pass a specificQueryClientinstance to the hook.Two stragglers found while verifying the guardrail are converted here so the rules land green:
CustomModesManager.spec.ts: 9 remaining directvi.clearAllMocks()call sites missed by [Refactor] Reuse shared CustomModesManager test helpers #1190 (helper was already imported).useSelectedModel.spec.ts/useZooGatewayRouterModelsSync.spec.ts: hand-rollednew QueryClient({ queries: { retry: false } })replaced with the sharedcreateTestQueryClient().Both rules were probe-tested: a temporary offending file in each lane errors with the intended message.
This is a test-and-lint-config-only change with no intended runtime or user-facing behavior change.
Test Procedure
pnpm exec vitest run core/config/__tests__/CustomModesManager.spec.tsfromsrc(48 tests passed)pnpm exec vitest run src/components/ui/hooks/__tests__/useZooGatewayRouterModelsSync.spec.ts src/components/ui/hooks/__tests__/useSelectedModel.spec.tsfromwebview-ui(48 + 42 tests passed)pnpm test(extension: 445 files, 7,355 tests; webview: 145 files, 1,643 tests)pnpm lintpnpm check-types--max-warnings=0;src/eslint-suppressions.jsonunchanged.Pre-Submission Checklist
src/test-utils/,@/utils/test-utils) are used only for mechanical duplication; test intent and scenario-specific mocks remain visible.Visual Snapshots
Not applicable; no product UI changed.
Videos (interaction / animation only)
Not applicable; no product interaction changed.
Documentation Updates
Additional Notes
No changesets were added. Author self-review found no behavior or scope regressions. The
.tsxscoping of the webview rule is deliberate; hook specs that need a specificQueryClientinstance keep localrenderHookwrappers but now sharecreateTestQueryClient().Get in Touch
Mention
@roomoteon this PR for follow-up requests.