test: improve coverage with new tests for badges, skillZip, uploadFiles#133
Merged
Conversation
Add comprehensive tests for the badges utility functions: - isSkillHighlighted, isSkillOfficial, isSkillDeprecated - getSkillBadges with all badge combinations Improves branch coverage from 50% to 100% for badges.ts.
Add tests for the deterministic ZIP building utility from PR #130: - buildSkillMeta function - buildDeterministicZip with various scenarios - Verifies deterministic output and _meta.json inclusion Achieves 100% coverage for skillZip.ts.
Add jsdom tests for the expandDroppedItems function: - Handles null/empty DataTransferItemList - Collects files via getAsFile fallback - Collects files via webkitGetAsEntry for file entries - Recursively collects files from directory entries - Skips non-file/non-directory entries Improves branch coverage for uploadFiles.ts.
Test the formatArkErrors truncation logic when there are more than 3 validation errors, ensuring the "+N more" message is displayed.
Include convex/lib/skillZip.ts in coverage reports to track the deterministic ZIP building utility added in PR #130.
Add entries for new tests and coverage configuration changes.
Format import statement to single line per Biome rules.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
badges.tsutility functionsskillZip.tsdeterministic ZIP building from PR VirusTotal Integration on ClawHub #130expandDroppedItemsfunction inuploadFiles.tsconvex/lib/skillZip.tsin coverage reportsTest plan
bun run coveragepasses with 70.76% branch coverage (above 70% threshold)bun run lintpassesGreptile Overview
Greptile Summary
This PR increases test coverage by adding new unit tests for
src/lib/badges.ts, deterministic ZIP generation inconvex/lib/skillZip.ts, and jsdom coverage forexpandDroppedItemsinsrc/lib/uploadFiles.ts. It also adds a schema test intended to ensure ark validation errors are truncated (4+ errors) and updatesvitest.config.tsto includeconvex/lib/skillZip.tsin coverage reporting.Confidence Score: 4/5
toThrow('+')assertion that can yield false positives and weaken regression coverage.Context used:
dashboard- AGENTS.md (source)