Skip to content

Fix TypeScript template test discovery for Node 20#34

Closed
GsCommand wants to merge 1 commit intomainfrom
codex/fix-typescript-ci-in-pr-#33
Closed

Fix TypeScript template test discovery for Node 20#34
GsCommand wants to merge 1 commit intomainfrom
codex/fix-typescript-ci-in-pr-#33

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Node 20 does not export globSync and passing wildcard patterns to node --test is unreliable, so test discovery should explicitly locate test files and skip missing optional suites.

Description

  • Replace glob/wildcard invocation with directory-based discovery in typescript-sdk/scripts/template-tests.mjs using existsSync, readdirSync, path, and fileURLToPath to collect *.test.mjs files and invoke node --test with explicit file paths.
  • Skip suites when the directory is absent or no test files match, and run tests with cwd set to the repository root.

Testing

  • Ran cd typescript-sdk && npm run typecheck && npm run build && npm run test:unit, which failed at existing src/index.ts TypeScript errors so the build/tests did not complete.
  • Ran node scripts/parity-check.mjs, which failed because TypeScript build artifacts are absent when the build fails.

Codex Task

@GsCommand GsCommand closed this Apr 24, 2026
@GsCommand GsCommand deleted the codex/fix-typescript-ci-in-pr-#33 branch April 24, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant