Skip to content

fix: typecheck test files in CI - #304

Merged
arbrandes merged 1 commit into
openedx:mainfrom
arbrandes:arbrandes/typecheck-test-files
Aug 29, 2026
Merged

fix: typecheck test files in CI#304
arbrandes merged 1 commit into
openedx:mainfrom
arbrandes:arbrandes/typecheck-test-files

Conversation

@arbrandes

Copy link
Copy Markdown
Contributor

Description

Nothing in CI typechecked test files, so type errors in *.test.ts and *.test.tsx could land on main unnoticed. tsconfig.build.json excludes test files from the build, and npm run test transpiles through Babel, which does no typechecking.

This adds an npm run typecheck script and a corresponding CI step. It covers the root project (runtime/, shell/) and tools/, whose tsconfigs already include their test files. The rootDir addition to tsconfig.json is what makes tsc -p tsconfig.json runnable at all: without it, the self-referencing @openedx/frontend-base imports in shell/ make the project root ambiguous when resolving the package's own exports map. It is a no-op for the build, which already infers the same value.

test-site is left alone, since its test files are already typechecked by fork-ts-checker-webpack-plugin during the existing Build Test Site step.

Fixes #294

LLM usage notice

Built with assistance from Claude.

Nothing in CI typechecked test files, so type errors in *.test.ts and
*.test.tsx could land on main unnoticed. The build config excludes them
and jest transpiles through Babel, which does no typechecking.

Fixes openedx#294

Co-Authored-By: Claude <noreply@anthropic.com>
@arbrandes
arbrandes merged commit 8115f2a into openedx:main Aug 29, 2026
5 checks passed
@arbrandes
arbrandes deleted the arbrandes/typecheck-test-files branch August 29, 2026 13:50
@openedx-semantic-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.0-alpha.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI does not typecheck test files

2 participants