Skip to content

Increase Jest branch coverage above 80% by adding edge-case tests - #7

Merged
cruddasj merged 1 commit into
mainfrom
codex/increase-jest-branch-coverage-to-80%
Mar 18, 2026
Merged

cruddasj merged 1 commit into
mainfrom
codex/increase-jest-branch-coverage-to-80%

Conversation

@cruddasj

Copy link
Copy Markdown
Owner

Motivation

  • Raise Jest branch coverage to at least 80% for the client app so more code paths are exercised by unit tests.

Description

  • Expanded tests/app.coverage-extra.test.js with multiple new scenarios covering update-flow fallbacks, modal behavior (overlay/escape/close button), malformed/failed changelog and version responses, navigation/brand-home paths, storage failures, and confirmed/cancelled clear-data flows.
  • Updated the test DOM fixtures (added #updateButton and a close-modal button) to exercise UI flows without changing production code.
  • Added changelog entries to CHANGELOG.md and assets/changelog.json using [NEXT_VERSION] / [NEXT_DATE] placeholders to document the testing/quality update.
  • Left jest.config.js and coverage collection targeting assets/js/app.js unchanged per repository guidance.

Testing

  • Ran npm outdated --json (no patch/minor dependency updates applied).
  • Ran npm run lint which completed successfully (ESLint + markdownlint).
  • Ran npm test -- --coverage and all tests passed (2 test suites, 27 tests in the final run) and coverage met the goal with branch coverage for assets/js/app.js above 80% (reported 81.22%).

Codex Task

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
95.25% (+7.31% 🔼)
782/821
🟢 Branches
81.22% (+12.07% 🔼)
199/245
🟢 Functions
97.44% (+7.69% 🔼)
38/39
🟢 Lines
95.25% (+7.31% 🔼)
782/821

Test suite run success

27 tests passing in 2 suites.

Report generated by 🧪jest coverage report action from 3ef7824

@cruddasj
cruddasj merged commit 54ff921 into main Mar 18, 2026
5 checks passed
@cruddasj
cruddasj deleted the codex/increase-jest-branch-coverage-to-80% branch March 18, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant