This repository was archived by the owner on May 24, 2026. It is now read-only.
typescript-sdk: skip missing optional template test suites#28
Closed
GsCommand wants to merge 1 commit into
Closed
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
node --teston hardcoded globs and fails CI when optional runtime template tests are absent, which should not block TypeScript SDK CI.runtime/tests/*.test.mjsas optional and only run suites that actually have matching test files.Description
existsSync/readdirSyncandpathimports and arepoRootconstant to resolve paths relative to the repository root.hasGlobMatches(pattern)which checks whether the target directory exists and whether the filename glob has at least one match using a simple wildcard-to-regex matcher.node --testfor suites that do exist, preserving non-zero exit propagation for failing suites.cwdfor the spawnednode --testprocesses to use the resolvedrepoRootfor consistent execution context.Testing
npm run typecheckwas executed and failed due to pre-existing TypeScript errors intypescript-sdk/src/index.ts, which are unrelated to this script change.npm run buildwas executed and failed during the DTS step for the same pre-existing TypeScript errors insrc/index.ts.npm run test:unitwas executed and failed because it invokesnpm run build, which failed for the same reason.node scripts/template-tests.mjswas executed directly and the script ran the availableruntime/testsandtypescript-sdk/testssuites when present and correctly propagated non-zero exits for failing tests.Codex Task