Skip to content

test(coverage): improve coverage and generate badge - #1799

Draft
John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
test/coverage-99
Draft

John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
test/coverage-99

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

This PR increases Socket CLI test coverage from the current sixty-ish percent toward 99% with high-quality, scenario-based tests. It also generates the README coverage badge from Vitest's aggregate line coverage report.

@cursor

cursor Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are limited to Vitest config, npm scripts, a README badge updater, and new tests—no production implementation files are modified in this diff.

Overview
Adds automated README coverage badges by extending Vitest with json-summary reporting (reportOnFailure), wiring pnpm run coverage:test to run scripts/coverage-badge.mts, and seeding marker-delimited badge HTML in README.md (currently 65%).

Expands unit tests across manifest (Gradle/sbt POM conversion, Conda outputRequirements, setupManifestConfig cancel/save flows), api.mts (polling 202s, auth/HTTP/JSON errors, sendApiRequest, SDK handleApiCall*, base URL and status helpers), and small utils (dlx shadowing, Yarn Berry detection, tildify, org plans, msAtHome), plus tests for the badge script itself. Reported line coverage moves from ~63.5% to ~65.4% without changing coverage excludes.

Reviewed by Cursor Bugbot for commit 169a92f. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 169a92f. Configure here.

Comment thread scripts/coverage-badge.mts Resolved
@jdalton
John-David Dalton (jdalton) marked this pull request as draft December 2, 2026 00:50
@jdalton
John-David Dalton (jdalton) marked this pull request as ready for review December 2, 2026 00:51
@jdalton
John-David Dalton (jdalton) marked this pull request as draft December 2, 2026 00:55
auto-merge was automatically disabled December 2, 2026 00:55

Pull request was converted to draft

@jdalton
John-David Dalton (jdalton) force-pushed the test/coverage-99 branch 11 times, most recently from 01944e1 to 6adae71 Compare December 3, 2026 16:53

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant