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
test(cli,tui): typecheck the __tests__ dirs (split from #1767 — 76 type errors to resolve) #1791
Split out from #1767 (the third of its three bullets) during the tidy-bundle PR that closed the rest. The cli and tui typecheck scripts (tsc --noEmit -p tsconfig.json, added in #1689) include only src and exclude**/*.test.{ts,tsx}, so the __tests__ dirs — which do the most as casting — get no tsc pass. web already typechecks its tests via tsc -b.
A spike (adding a tsconfig.test.json per client that includes __tests__ with the test-exclusions removed, and running tsc --noEmit on it) surfaces 76 errors — cli 58, tui 18 — which is why this was carved out of the tidy bundle rather than rushed:
Add a tsconfig.test.json to clients/cli and clients/tui that inherits the base compilerOptions, includes __tests__/**/*, and drops the **/*.test.* exclusions. Add the test-only path aliases (@modelcontextprotocol/inspector-test-server, the @inspector/core/* deep paths) so tsc resolves what vitest resolves via resolve/projectResolve.
Fold tsc --noEmit -p tsconfig.test.json into each client's typecheck (it already runs the src-only config).
Fix what it surfaces. The implicit-anys are trivial annotations; the alias errors are the config above; the partial-mock TS2345s should be fixed with typed mock factories where practical rather than a spray of as unknown as casts (per the AGENTS.md as-cast policy) — a shared makeFakeInspectorClient() / makeFakeServerSettings() helper is likely the right shape.
Activity
chore: close a batch of quality-gate & tidy gaps (#1785 #1787 #1789 #…
test(cli,tui): typecheck the __tests__ dirs (#1791) (#1799)
cliffhall commentedon Jul 27, 2026
Merged in #1799 (squashed as d9e4f44 onto
v2/main). Closing manually —Closes #Ndoesn't auto-fire for PRs targeting a non-default branch.