Skip to content

refactor(tests): extract shared positioning test helpers - #38

Merged
setchy merged 1 commit into
mainfrom
refactor/dedupe-positioning-tests
Nov 9, 2026
Merged

setchy merged 1 commit into
mainfrom
refactor/dedupe-positioning-tests

Conversation

@setchy

@setchy setchy commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Extracts withFullDisplayBar() and hideAndReopen() helpers in tests/positioning.test.js.
  • Replaces the repeated full-display-bar and hide/keyboard-reopen setup blocks with the helpers.

Why

The SonarCloud quality gate on main failed with 8.3% Duplication on New Code (required ≤ 3%). The duplicated blocks were the repeated test setup sequences in tests/positioning.test.js; this removes all 44 duplicated lines while keeping the test coverage and assertions unchanged.

Verification

  • pnpm test — 28 passed
  • pnpm lint:check — clean
  • pnpm bundle — succeeds

@setchy
setchy requested a review from afonsojramos as a code owner November 9, 2026 10:55
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@setchy
setchy merged commit 1042134 into main Nov 9, 2026
2 checks passed
@setchy
setchy deleted the refactor/dedupe-positioning-tests branch November 9, 2026 10:57
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