Repository navigation
chore(motion-kit): type-check it apart from the build and fail its browser tests in CI without Chrome - #87
Merged
Conversation
…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.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
tsconfig.jsonincludedmotion-kit/, andmotion-kit/render.tsximports about 29 app modules through@/, so a product change that broke motion-kit's types failednext buildand the production image build indeploy/Dockerfile. The root config now excludesmotion-kit, andmotion-kit/tsconfig.jsonextends it as a second project.pnpm typecheckrunstsc --noEmit && tsc --noEmit -p motion-kit, so CI still checks motion-kit, andnext buildlists no motion-kit file.motion-kit/next-types.d.tsreferences Next's types for the app's*.module.scssimports; the name avoids thenext-env.d.tspattern.gitignoreignores in every directory.The four Chrome-backed tests in
motion-kit/test/capture.test.tsandmotion-kit/test/motion-kit.test.tsskipped when no browser started, so a runner without Chrome dropped them unseen.motion-kit/test/browser.tsholds the shared decision:startBrowser()returns the browser or the launch error, andhasBrowser(t, browser)fails the test with that error whenCIis set and skips with it otherwise. GitHub'subuntu-latestimage ships Chrome, soci.ymlis unchanged.With
CHROMIUM_PATH=/nonexistent/chrome,node --test motion-kit/test/*.test.tspasses 14 and skips 4 locally, and fails those 4 underCI=1. A type error added tomotion-kit/spec.tsfailspnpm typecheckand passes a root-onlytsc --noEmit.