Skip to content

test: enforce network-controller source type checks - #11031

Open
cryptodev-2s wants to merge 1 commit into
test/vitest-network-controllerfrom
test/network-controller-typecheck
Open

cryptodev-2s wants to merge 1 commit into
test/vitest-network-controllerfrom
test/network-controller-typecheck

Conversation

@cryptodev-2s

@cryptodev-2s cryptodev-2s commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

Stacked on #10873. Remove ignoreSourceErrors from network-controller's Vitest configuration so source diagnostics also fail the test command.

Use a non-composite test tsconfig without project references and explicitly select the declared @typescript/native compiler. skipLibCheck follows the repository's existing build/lint policy for dependency declarations.

Remove obsolete clock arguments, move an expected-error directive to the invalid property, and give the mixed client registry its existing union type in the test. Remove the 21 TSC suppressions these fixes make unnecessary.

Validation

  • All 5,338 package tests pass, including the type test; coverage thresholds pass.
  • A broken type assertion fails the default test command while all 5,337 runtime tests pass.
  • An unused @ts-expect-error and a source-only type error each fail type checking. All temporary mutations were restored.
  • Root TSC, lint, formatting, tsconfig checks, constraints, dependency checks, CODEOWNERS, and changelog validation pass.
  • Type checking also passes on Node 22.14; yarn install --immutable passes.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation as appropriate: no consumer documentation changes needed
  • I've communicated changes to consumers with changelogs: not applicable, test-only changes
  • I've introduced breaking changes: none

Note

Low Risk
Changes are limited to test tooling configuration and test-only type fixes; no production runtime behavior is modified.

Overview
Enforces real TypeScript checking on network-controller tests instead of ignoring source errors during Vitest typecheck.

Vitest now runs the native @typescript/native checker against a new tsconfig.test.json (non-composite, noEmit, skipLibCheck, no project references). Related entries are removed from tsc-suppressions.json.

Test fixes so the suite typechecks cleanly: explicit typing for getNetworkClientRegistry() in NetworkController.test.ts, repositioned @ts-expect-error on the intentional bad RPC payload in rpc-service.test.ts, and dropped obsolete clock arguments to waitForPromiseToBeFulfilledAfterRunningAllTimers in shared network-client test helpers.

Reviewed by Cursor Bugbot for commit c508725. Bugbot is set up for automated code reviews on this repo. Configure here.

@cryptodev-2s
cryptodev-2s requested review from a team as code owners October 23, 2026 09:41
@cryptodev-2s
cryptodev-2s added this pull request to stack #11032 October 23, 2026 09:41
@cryptodev-2s
cryptodev-2s deployed to default-branch October 23, 2026 09:41 — with GitHub Actions Active
@cryptodev-2s
cryptodev-2s force-pushed the test/network-controller-typecheck branch from c508725 to 518c466 Compare October 23, 2026 17:17
@cryptodev-2s
cryptodev-2s force-pushed the test/network-controller-typecheck branch from 518c466 to 861ff48 Compare October 23, 2026 17:37
Use a non-composite test tsconfig and explicitly select the declared native TypeScript compiler. Fix stale test-helper arguments, the expected-error directive, and the registry annotation, then remove the 21 obsolete TSC suppressions.
@cryptodev-2s
cryptodev-2s force-pushed the test/network-controller-typecheck branch from 861ff48 to d0cb7ea Compare October 23, 2026 20:06

This branch was successfully deployed

1 active (outdated) deployment
default-branch — c5087252 Deployed Oct 23, 2026 by cryptodev-2s via Determine whether this PR is a release PR #5943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant