Skip to content

fix: TS18048 in GamePhaseComponents.test.tsx - #324

Merged
S540d merged 3 commits into
testingfrom
fix/gamephase-hintbtn-ts18048
Sep 6, 2026
Merged

S540d merged 3 commits into
testingfrom
fix/gamephase-hintbtn-ts18048

Conversation

@S540d

@S540d S540d commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Befund

npx tsc --noEmit schlägt auf testing fehl:

components/__tests__/GamePhaseComponents.test.tsx(239,12): error TS18048: 'hintBtn' is possibly 'undefined'.

expect(hintBtn).toBeTruthy() narrowt den Typ für TypeScript nicht — der nachfolgende Property-Zugriff bleibt possibly undefined. Dadurch schlägt der 🔍 Code Quality & Linting-Check in CI auf jedem PR gegen testing fehl (aufgefallen als Teil von PR #323, unabhängig von dessen eigentlicher Änderung).

Fix

Non-null assertion für den Property-Zugriff im nächsten Statement (etabliertes Muster für diesen Fall).

Test plan

  • npx tsc --noEmit → Exit 0
  • npm test -- GamePhaseComponents → 15/15 grün
  • Lint + Prettier (Pre-Push-Hook) grün

🤖 Generated with Claude Code

https://claude.ai/code/session_01AS54CHuJc8Hm28KnyRqpz2


Generated by Claude Code

npm audit fix (ohne --force) behebt das einzige High-Finding
(browserslist <=4.28.6, GHSA-c83g-rgw3-j3cx) sowie @xmldom/xmldom
(moderate), beide ohne Breaking Changes. Verbleibende 21 moderate
Findings (decode-uri-component/uuid über die Expo-Toolchain) bleiben
bewusst offen — audit-level=high blockiert davon nichts mehr.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS54CHuJc8Hm28KnyRqpz2
…ch toBeTruthy)

npx tsc --noEmit schlägt auf testing fehl: 'hintBtn' is possibly
'undefined' (TS18048). expect(hintBtn).toBeTruthy() narrowt den Typ
für TypeScript nicht, daher non-null assertion für den Property-Zugriff
im nächsten Statement.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS54CHuJc8Hm28KnyRqpz2
… testing)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS54CHuJc8Hm28KnyRqpz2
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

🔀 Mergeability-Report

✅ Konfliktfrei mergebar (unstable).
✅ Ziel-Branch testing ist policy-konform.

CI-Checks: ✅ keine fehlgeschlagenen Checks

⏳ mergeability / mergeability
⏳ 🔐 Docs Privacy Check
⏳ ⚙️ Workflow Linting / actionlint
⏳ 🔧 Platform Compatibility
⏳ 🔍 Code Quality & Linting
⏳ 🔒 Security Audit
⏳ 🔑 Keystore & Credential Scan
⏳ Analyze (javascript-typescript)
⏳ Analyze (actions)
✅ CodeQL
✅ 🔧 Platform Compatibility
✅ ⚙️ Workflow Linting / actionlint
✅ 🔒 Security Audit
✅ 🔑 Keystore & Credential Scan
✅ mergeability / mergeability
⏳ 🔍 Code Quality & Linting
✅ 🔐 Docs Privacy Check
⏳ Analyze (javascript-typescript)
✅ Analyze (actions)

Merge-Checkliste

  • CI-Checks grün
  • Keine Merge-Konflikte
  • Ziel-Branch korrekt
  • (Optional) tiefes KI-Review via /review aus Claude Code (Pro-Abo, ohne API-Kosten)

Kostenlos generiert von reusable-mergeability.yml · keine API-Kosten · review-gate: success

S540d commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

🔒 Security Audit schlug fehl, aber nicht durch diesen PR: testing selbst hat das browserslist-High-Finding (Issue #322), unabhängig vom hier gemachten TS18048-Fix.

Fix existiert bereits in PR #323 (npm audit fix) — dort ist dieser TS18048-Fix bereits gemerged, daher jetzt umgekehrt auch hier portiert (Commit 819168e; beide Branches sind inhaltlich identisch, PR #323 enthält den TS-Fix zusätzlich). npm audit --audit-level=high → Exit 0 lokal verifiziert.


Generated by Claude Code

@S540d
S540d merged commit 70b9498 into testing Sep 6, 2026
26 checks passed
@S540d
S540d deleted the fix/gamephase-hintbtn-ts18048 branch October 11, 2026 05:52
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.

2 participants