Skip to content

[heft-jest-plugin] Validate managed Jest configuration - #6211

Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 1 commit into
microsoft:mainfrom
yashwanth195:user/yverupaka/jest-managed-config
Open

Yashwanth Reddy Verupaka (yashwanth195) wants to merge 1 commit into
microsoft:mainfrom
yashwanth195:user/yverupaka/jest-managed-config

Conversation

@yashwanth195

Copy link
Copy Markdown
Contributor

Summary

Add the preflight foundation for managed Jest shards, rejecting unsupported configuration instead of silently stripping hooks or checks. This standalone rollout step does not enable sharding or change ordinary Jest execution.

Details

JestManagedConfiguration exports a pure validator and the canonical coverage reporter predicate for future managed-shard and coverage consumers. It preserves configuration, rejects unsupported hooks/reporters and incomplete coverage settings, and permits supported defaults, Babel and V8 configurations.

No runtime wiring or new dependencies. Existing unsharded hooks/reporters and runtime performance are unchanged. Includes focused typed tests and a minor changefile for the new importable API.

How it was tested

On Windows with Node 24.22.1; the final committed tree is identical to the independently reviewed and validated tree:

  • node common\scripts\install-run-rush.js build --to @rushstack/heft-jest-plugin passed, including prerequisites, TypeScript and lint.
  • node common\scripts\install-run-rush.js test --only @rushstack/heft-jest-plugin passed: 70 tests in 2 suites; the build was reused from cache.
  • node common\scripts\install-run-rush.js prettier passed without edits.
  • node common\scripts\install-run-rush.js change --verify --target-branch upstream/main --no-fetch passed.

Cases cover rejected settings with diagnostics, explicit disabled/undefined values, supported coverage, and immutable inputs. Generated declarations use the existing @jest/reporters type re-export; compiled preflight imports no runtime modules.

Impacted documentation

Package README only; no website or schema changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant