Repository navigation
Discover TypeScript test suites automatically - #515
Merged
Merged
Conversation
Keep the existing build and test-compilation stages, then use quoted native recursive globs for compiled JavaScript and runtime MJS suites. Regressions prove new flat and nested suites execute, helpers and raw TypeScript are ignored, and new test failures propagate. Document the supported test locations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the automatic test-discovery change.
No open issues 🎉
What changed in this PR
This PR replaces TypeScript’s manually maintained test-suite list with automatic discovery, closing the gap where new tests could compile without running. It complements the existing CI invocation of npm test without changing the build stages or runtime APIs.
Changes:
- Use quoted recursive Node test patterns for compiled JavaScript and runtime MJS suites.
- Add offline regressions for flat and nested discovery, helper-file exclusion, and failure propagation.
- Document supported test locations and naming conventions.
| File | Description |
|---|---|
typescript/tests/test-discovery.test.mjs |
Adds discovery and failure-propagation regression tests. |
typescript/README.md |
Explains automatic discovery and where to add tests. |
typescript/package.json |
Replaces explicit suite paths with recursive patterns. |
Review effort: Balanced
Tal Zaccai (TalZaccai)
approved these changes
Nov 3, 2026
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
Remove the manually maintained TypeScript suite list so newly added tests cannot compile without executing. This hardens the gap found in the original #513 coding-pilot candidate; #505 already makes Node CI invoke
npm test.out/**/*.test.jsandtests/**/*.test.mjs.Verification
Both new regressions failed with the old explicit selector.
Both pass on Node 22.23.4, 24.22.1, and 26.12.1.
The actual configured
npm teston pinned Node 24.22.1 builds, type-checks, and passes all 243 tests, with no failures or skips: the previous 241 plus both discovery regressions. Its package-consumer/workspace-build check also passes.git diff --checkpasses.The first full invocation failed only because the fresh worktree lacked
tsc; restored the unchanged locked workspace dependencies from the existing offline cache with install scripts disabled. Dependency versions and lockfiles are unchanged.All 12 CI checks pass at
ddab45bba267a30fa0d3023f8f7a638872e92b0a. The Node CI logs were checked: Node 22.23.4, 24.22.1, and 26.12.1 each actually ran and passed all 243 tests, including both discovery regressions.Scope
Only the TypeScript test script, one regression file, and related README changed. No runtime/API, engine, CI-matrix, workflow-permission, budget, or coding-pilot activation changes. No coding/drafting run, issue closure, or merge. Existing contributor work and the historical automated publication evidence remain unchanged.