Repository navigation
test: close TypeScript validators after each test - #469
Merged
robgruen merged 2 commits intoNov 1, 2026
Merged
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree |
Refresh microsoft#469 against current main after the CI test step landed in microsoft#505. Preserve the contributor's validator lifecycle fix and all current regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the per-test validator cleanup change.
No open issues 🎉
What changed in this PR
This PR addresses validator cleanup from #463 by adding per-test teardown to the shared TypeScript test fixture. It prevents native compiler processes from accumulating without changing production validation behavior; CI test execution was already addressed in #505.
Changes:
- Track validators created by the shared helper.
- Close tracked validators in
afterEach, including when assertions fail, while preserving existing regression tests.
| File | Description |
|---|---|
typescript/test/validate.test.ts |
Track test-created validators and close them after each test. |
Review effort: Balanced
robgruen
approved these changes
Nov 1, 2026
robgruen
left a comment
Contributor
There was a problem hiding this comment.
Thank you for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
afterEach, including when assertions fail.main, preserving the contributor's commits and the expanded validator regression suite.Scope
The Node.js CI change to run
npm testalready landed in #505. This PR now changes only validator teardown in the test fixture; it preserves the existing CI test step and library/example build coverage.Why
With TypeScript 7, each validator owns a native compiler process. Releasing each validator after its test prevents compiler processes from accumulating during the suite without changing production validation behavior.
Validation
Verified on Windows with the repository-pinned Node.js 24.22.1:
npm ci --ignore-scripts; library and example builds then run explicitly.npm test: 219 tests passed, 0 failed.npm run build-all: passed.Fresh CI verified for head
5541b15:Closes #463