Skip to content

test(notification-service): cover payload cms validation and seeding - #2

Merged
romdj merged 1 commit into
mainfrom
test/sonar-coverage
Sep 9, 2026
Merged

romdj merged 1 commit into
mainfrom
test/sonar-coverage

Conversation

@romdj

@romdj romdj commented Sep 9, 2026

Copy link
Copy Markdown
Owner

The SonarQube quality gate on main failed with 64.2% coverage on new code against the required 80%. The uncovered changes were concentrated in the notification service's Payload CMS migration.

Add 51 tests covering collection validation and audit hooks, environment configuration, and template seeding on empty/existing databases and error paths. The tests exercise the real collection hooks and seed entry point while mocking the external CMS boundary. No production code or coverage exclusions change.

Validation:

  • Full notification coverage suite: 143 passed, 2 existing skips; line coverage increased from 34.1% to 81.79%.
  • All five targeted CMS files have 100% local line coverage, including every CMS new-code line Sonar marked uncovered.
  • Repository lint, type checks, and service unit suites passed on Node 24; three existing frontend type-check warnings remain.
  • New tests also passed a dedicated TypeScript check and ESLint.

SonarQube's new-code gate still needs confirmation in CI; the local service line-coverage percentage is a separate metric.

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

@romdj
romdj merged commit 73363a0 into main Sep 9, 2026
38 checks passed
@romdj
romdj deleted the test/sonar-coverage branch September 9, 2026 19:27
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