Expand unit test coverage and add PR preview deployments#65
Merged
Conversation
Adds tests for previously-untested branches: modelerStore's expand/collapse tracking, addChildToSelected, addNodeFromData drag-drop paths, updateNodeData, pasteToSelected, moveNode/duplicateSelected guards, and simplifyTree; the remaining nodeSummary kinds in operations.ts; bounds/evaluate/codegen for every SDF primitive, pattern, and text/glyph path; and simplify.ts's splitCreaseEdges crease-detection logic. Also wires up @vitest/coverage-v8 and a test:coverage script. Statement coverage rises from ~57% to ~92%, branch coverage from ~44% to ~80%.
Builds and deploys each PR's branch to Cloudflare Pages as a preview, then posts (and updates on subsequent pushes) a PR comment with the preview URL, so changes can be reviewed live without pulling the branch.
|
🚀 Preview deployed: https://claude-github-test-coverage.sinter.pages.dev (updates on every push to this PR) |
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.
Summary
modelerStore,operations, and the SDF worker modules (bounds,evaluate,codegen,simplify) — statement coverage rises from ~57% to ~92%, branch coverage from ~44% to ~80%.@vitest/coverage-v8and atest:coveragescript.PR PreviewGitHub Actions workflow that deploys each PR to Cloudflare Pages and posts (and updates) a comment with the live preview URL.Test plan
npm test— 179 tests passingnpx tsc --noEmit— cleanPR Previewworkflow deploys successfully and comments the preview URL once this PR is open (requiresCLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_IDsecrets, already used by the existing deploy workflow)Generated by Claude Code