Skip to content

fix(test): stop the Tauri check from throwing once a test page is gone - #549

Merged
A-EDev merged 1 commit into
mainfrom
fix/tauri-env-teardown
Nov 10, 2026
Merged

A-EDev merged 1 commit into
mainfrom
fix/tauri-env-teardown

Conversation

@A-EDev

@A-EDev A-EDev commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • isTauriEnv() waits up to 100 ms for Tauri's bridge and reads window after each 10 ms pause. When a test file finishes during that wait, jsdom is torn down, the next read throws, and Vitest reports an unhandled rejection that fails the run although every test passed. That is what failed Quality checks on main after fix(i18n): mirror the layout in right-to-left languages and keep foreign titles in order #548 (run 42837153459, started from musicAudioSettings.test.ts).
  • The loop now stops and answers false when window is gone. A co-located test covers it.

Related issue

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Documentation
  • Build, packaging, or CI

Validation

  • pnpm test: 386 files, 2287 tests passed, no unhandled errors. The new test fails without the fix ("promise rejected TypeError") and passes with it.
  • pnpm build: passed
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: clean
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: exit 0 (no Rust changes)
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: 1680 passed, 0 failed
  • I smoke-tested the affected desktop behavior.

Screenshots or recordings

Risk and compatibility

  • No change in the app: inside Tauri window never goes away. No changelog entry, since nothing changes for users.

  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.

  • User-facing documentation was updated where needed.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Breaking changes and upgrade steps are clearly documented.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@A-EDev
A-EDev merged commit c251f8a into main Nov 10, 2026
7 checks passed
@A-EDev
A-EDev deleted the fix/tauri-env-teardown branch November 10, 2026 16:03
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