Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Addresses feedback from #14 to align mock setup with codebase patterns and prevent Vitest hoisting issues.

Changes

  • Refactored tauriBridge and tauriSecureStorage mocks in settingspanel.vitest.tsx to use vi.hoisted() pattern

Before/After

// Before
vi.mock("../src/tauriBridge", () => ({
    audioTestIntervention: vi.fn().mockResolvedValue(undefined),
    // ... other mocks
}));

// After
const tauriBridgeMocks = vi.hoisted(() => ({
    audioTestIntervention: vi.fn().mockResolvedValue(undefined),
    // ... other mocks
}));

vi.mock("../src/tauriBridge", () => tauriBridgeMocks);

This matches the pattern used in monitor-control.vitest.tsx, recordingbar.vitest.tsx, and other test files.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: chrisgleissner <3969147+chrisgleissner@users.noreply.github.com>
Copilot AI changed the title [WIP] Update boosting code coverage and e2e test integration Refactor settingspanel test mocks to use vi.hoisted() Nov 21, 2025
Copilot AI requested a review from chrisgleissner November 21, 2025 16:48
@chrisgleissner chrisgleissner marked this pull request as ready for review November 21, 2025 19:26
Copilot AI review requested due to automatic review settings November 21, 2025 19:26
@chrisgleissner chrisgleissner merged commit 72a8f16 into cursor/boost-code-coverage-and-integrate-e2e-tests-a547 Nov 21, 2025
8 of 10 checks passed
@chrisgleissner chrisgleissner deleted the copilot/sub-pr-14 branch November 21, 2025 19:26
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.67%. Comparing base (65613c2) to head (68601a6).

Additional details and impacted files
@@                                   Coverage Diff                                    @@
##           cursor/boost-code-coverage-and-integrate-e2e-tests-a547      #15   +/-   ##
========================================================================================
  Coverage                                                    52.67%   52.67%           
========================================================================================
  Files                                                           12       12           
  Lines                                                         2149     2149           
========================================================================================
  Hits                                                          1132     1132           
  Misses                                                        1017     1017           

☔ 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.

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