Skip to content
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
mainfrom
codex/fix-ci-for-pr-#27-in-sdk
Closed

typescript-sdk: skip missing optional template test suites#28
GsCommand wants to merge 1 commit into
mainfrom
codex/fix-ci-for-pr-#27-in-sdk

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • The template test runner currently invokes node --test on hardcoded globs and fails CI when optional runtime template tests are absent, which should not block TypeScript SDK CI.
  • The goal is to treat runtime/tests/*.test.mjs as optional and only run suites that actually have matching test files.

Description

  • Added existsSync/readdirSync and path imports and a repoRoot constant to resolve paths relative to the repository root.
  • Implemented 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.
  • The script now skips any suite whose glob has no matches and still runs node --test for suites that do exist, preserving non-zero exit propagation for failing suites.
  • Updated cwd for the spawned node --test processes to use the resolved repoRoot for consistent execution context.

Testing

  • npm run typecheck was executed and failed due to pre-existing TypeScript errors in typescript-sdk/src/index.ts, which are unrelated to this script change.
  • npm run build was executed and failed during the DTS step for the same pre-existing TypeScript errors in src/index.ts.
  • npm run test:unit was executed and failed because it invokes npm run build, which failed for the same reason.
  • node scripts/template-tests.mjs was executed directly and the script ran the available runtime/tests and typescript-sdk/tests suites when present and correctly propagated non-zero exits for failing tests.

Codex Task

@GsCommand GsCommand closed this Apr 24, 2026
@GsCommand GsCommand deleted the codex/fix-ci-for-pr-#27-in-sdk branch April 24, 2026 03:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant