Skip to content

fix: failing unit tests and enforce 100% coverage threshold#43

Merged
shazron merged 1 commit into
mainfrom
fix/unit-tests-coverage-100
May 8, 2026
Merged

fix: failing unit tests and enforce 100% coverage threshold#43
shazron merged 1 commit into
mainfrom
fix/unit-tests-coverage-100

Conversation

@shazron

@shazron shazron commented May 7, 2026

Copy link
Copy Markdown
Member

A downstream dep update is failing the tests that passed before.

Summary

  • Fix delete.test.js assertions that expected Deleted: 1 (a count) but the source outputs Deleted: <timestamp>
  • Add a missing test in status.test.js to cover the false branch of if (provisionStatusResponse.region), achieving 100% branch coverage
  • Add coverageThreshold to Jest config in package.json enforcing 100% statements, branches, functions, and lines globally

Test plan

  • npm test passes with all 471 tests green
  • Coverage report shows 100% across all metrics
  • Future changes that drop coverage below 100% will fail CI

🤖 Generated with Claude Code

- Fix delete.test.js assertions to match timestamp output instead of count
- Add missing branch coverage test for status.js region field
- Add Jest coverageThreshold enforcing 100% across all metrics

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shazron shazron changed the title fix: fix failing unit tests and enforce 100% coverage threshold fix: failing unit tests and enforce 100% coverage threshold May 7, 2026
@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@shazron

shazron commented May 7, 2026

Copy link
Copy Markdown
Member Author

/review

github-actions[bot]
github-actions Bot previously approved these changes May 7, 2026

@github-actions github-actions 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.

🤖 PR Reviewer

The diff introduces 100% coverage thresholds in Jest configuration and adds/fixes test cases. The changes are straightforward and improve test correctness by making assertions less brittle and adding a missing edge case for optional fields. No significant issues found.

LGTM! This PR looks good to merge.


💡 How to re-trigger

Comment /review or /pr-reviewer on this PR

@github-actions github-actions Bot dismissed their stale review May 8, 2026 04:08

Superseded by new review

@github-actions github-actions 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.

🤖 PR Reviewer

The diff includes reasonable test improvements: adding 100% coverage thresholds, loosening an overly specific assertion, removing a duplicate assertion, and adding a new test for an uncovered code path. These changes appear correct and improve test quality.

LGTM! This PR looks good to merge.


💡 How to re-trigger

Comment /review or /pr-reviewer on this PR

@shazron shazron merged commit 2763575 into main May 8, 2026
12 of 13 checks passed
@shazron shazron deleted the fix/unit-tests-coverage-100 branch May 8, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant