Skip to content

chore(forms): cover select default value before connect - #241

Merged
coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/select-form-default-value
Aug 25, 2026
Merged

chore(forms): cover select default value before connect#241
coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/select-form-default-value

Conversation

@cursor

@cursor cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Task: coverage for projects/forms/src/mixins/select.ts.

Why: the selector chose this file as the smallest gap below 90% branch coverage: "1 uncovered lines, 97.77% lines and 88.37% branches, the smallest gap below the 90% threshold".

The uncovered statement was #getDefaultValue(), which only runs on formResetCallback / formStateRestoreCallback when #initialValue is still unset (before connectedCallback).

Measurement

Metric Before After
Lines 97.77% (44/45) 100% (45/45)
Branches 88.37% (38/43) 97.67% (42/43)
Statements 97.91% (47/48) 100% (48/48)
Functions 100% 100%

Added one test in the existing select.test.ts. No other source file changed.

Public API

No public API changed. Production select.ts is untouched. Behavior is unchanged; this is test-only coverage.

Left alone

  • Did not delete #getDefaultValue or change reset/restore production logic.
  • Did not rewrite styles typography visual baselines. Local root pnpm run ci still fails three projects/styles typography visuals (text-type ~1%, line-height ~50.5%, override ~33.9%) on this VM; GitHub ci on main is green for the same suite.

Validation

  • projects/forms: lint pass, test 287 pass, test:coverage pass, test:lighthouse pass
  • test:types, test:axe, test:ssr, test:visual are not defined for forms
  • git diff --check clean; commitlint clean
  • Root pnpm run ci: only the pre-existing styles typography visual drift failed
Open in Web View Automation 

Adds a unit test for form reset and restore before connectedCallback
so getDefaultValue is exercised. Line coverage 97.77% to 100%, branch
coverage 88.37% to 97.67%. No public API or behavior change.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@coryrylan coryrylan added the upkeep label Aug 25, 2026 — with Cursor
@coryrylan
coryrylan marked this pull request as ready for review August 25, 2026 13:00
@coryrylan
coryrylan merged commit 724ee3f into main Aug 25, 2026
15 checks passed
@coryrylan
coryrylan deleted the topic/upkeep/coverage/select-form-default-value branch August 25, 2026 13:00
@coryrylan

Copy link
Copy Markdown
Collaborator

🎉 This issue has been resolved in version 2.5.0 🎉

Changelog

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants