Skip to content

chore(motion-kit): type-check it apart from the build and fail its browser tests in CI without Chrome - #87

Merged
jm-rivera merged 1 commit into
devfrom
chore/motion-kit-off-deploy-path
Oct 30, 2026
Merged

jm-rivera merged 1 commit into
devfrom
chore/motion-kit-off-deploy-path

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

tsconfig.json included motion-kit/, and motion-kit/render.tsx imports about 29 app modules through @/, so a product change that broke motion-kit's types failed next build and the production image build in deploy/Dockerfile. The root config now excludes motion-kit, and motion-kit/tsconfig.json extends it as a second project. pnpm typecheck runs tsc --noEmit && tsc --noEmit -p motion-kit, so CI still checks motion-kit, and next build lists no motion-kit file. motion-kit/next-types.d.ts references Next's types for the app's *.module.scss imports; the name avoids the next-env.d.ts pattern .gitignore ignores in every directory.

The four Chrome-backed tests in motion-kit/test/capture.test.ts and motion-kit/test/motion-kit.test.ts skipped when no browser started, so a runner without Chrome dropped them unseen. motion-kit/test/browser.ts holds the shared decision: startBrowser() returns the browser or the launch error, and hasBrowser(t, browser) fails the test with that error when CI is set and skips with it otherwise. GitHub's ubuntu-latest image ships Chrome, so ci.yml is unchanged.

With CHROMIUM_PATH=/nonexistent/chrome, node --test motion-kit/test/*.test.ts passes 14 and skips 4 locally, and fails those 4 under CI=1. A type error added to motion-kit/spec.ts fails pnpm typecheck and passes a root-only tsc --noEmit.

…owser tests in CI without Chrome

The root tsconfig included motion-kit, so a product change that broke motion-kit's types failed `next build` and with it the production image. motion-kit is now excluded there and checked as its own project, which `pnpm typecheck` runs after the app's. Its four Chrome-backed tests skipped when no browser started; under CI they now fail with the launch error, and locally they still skip with it.
@jm-rivera
jm-rivera merged commit 5b8ec19 into dev Oct 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant