Skip to content

♻️ refactor(auth-microservice) [OTP]: dedupe OTP spec blocks for the Sonar quality gate (tests only) - #39

Merged
JuankCadavid merged 1 commit into
dev-authfrom
dev-auth-otp
Sep 12, 2026
Merged

JuankCadavid merged 1 commit into
dev-authfrom
dev-auth-otp

Conversation

@JuankCadavid

Copy link
Copy Markdown
Contributor

Follow-up to #38, whose Quality Gate failed on 5.9 % duplication on new code — all of it in cognito.service.spec.ts (105 lines) and auth.service.spec.ts (28 lines); production files had 0.

Tests only: shared builders (mockFetchOnce, makeCognitoError, makeInitiateAuthResponse, expectOtpRejection, mockRegisterUserHappyPath) and it.each tables. 365 → 365 tests; assertions counted at runtime unchanged (121 → 121, 74 → 74). npx jest --silent 17 suites green, tsc clean.

No deploy impact.

🤖 Generated with Claude Code

…0 spec blocks into shared builders and it.each tables (Sonar new-code duplication 5.9% → ≤3%)

Tests only: 365 → 365 tests, runtime-counted assertions unchanged (cognito.service.spec 121 → 121, auth.service.spec 74 → 74); no production change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@JuankCadavid
JuankCadavid merged commit 0f4debf into dev-auth Sep 12, 2026
3 checks passed
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