Skip to content

Improve test coverage for uncovered UI formatting and Bloch scene branches - #21

Merged
itsubaki merged 3 commits into
mainfrom
copilot/add-test-coverage-analysis
Apr 4, 2026
Merged

Improve test coverage for uncovered UI formatting and Bloch scene branches#21
itsubaki merged 3 commits into
mainfrom
copilot/add-test-coverage-analysis

Conversation

Copilot AI commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

This updates the test suite to cover branches that were previously untested despite full statement coverage, focusing on coefficient formatting in the controls UI and interaction edge cases in the Bloch scene hook.

  • Control panel coefficient rendering

    • Added targeted tests for DesktopControls and MobileControls when amplitudes have negative real parts.
    • Covers the branch that toggles the real-sign placeholder vs. a visible - sign, which was previously unexercised.
  • Bloch scene interaction coverage

    • Extended useBlochScene tests to cover wheel zoom clamping at the upper bound.
    • Keeps the existing interaction-focused approach while exercising an untested branch in camera radius updates.
  • Coverage outcome

    • Brings desktop-controls.tsx and mobile-controls.tsx branch coverage to 100%.
    • Improves overall branch coverage without changing runtime behavior.
render(
  <DesktopControls
    {...createProps({
      quantumState: new QuantumState(
        new Complex(-1, 2),
        new Complex(-3, -4),
      ),
    })}
  />
)

expect(screen.getByTestId('a-value')).toHaveTextContent('-1.0000+2.0000i')
expect(screen.getByTestId('b-value')).toHaveTextContent('-3.0000-4.0000i')

Copilot AI and others added 3 commits April 4, 2026 04:29
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bloch Ready Ready Preview, Comment, Open in v0 Apr 4, 2026 4:34am

@codecov

codecov Bot commented Apr 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.24%. Comparing base (46aba14) to head (03ef8d6).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   98.74%   99.24%   +0.50%     
==========================================
  Files          14       14              
  Lines         398      398              
  Branches       60       60              
==========================================
+ Hits          393      395       +2     
+ Partials        5        3       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@itsubaki
itsubaki marked this pull request as ready for review April 4, 2026 04:45
@itsubaki
itsubaki merged commit 28270ea into main Apr 4, 2026
5 checks passed
@itsubaki
itsubaki deleted the copilot/add-test-coverage-analysis branch April 4, 2026 04:46
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