Skip to content

fix(ci): fix failing frontend tests#53

Merged
phmatray merged 3 commits intomainfrom
fix/ci-frontend-tests
Mar 9, 2026
Merged

fix(ci): fix failing frontend tests#53
phmatray merged 3 commits intomainfrom
fix/ci-frontend-tests

Conversation

@phmatray
Copy link
Contributor

@phmatray phmatray commented Mar 9, 2026

Summary

  • Fix broken import paths in DiffBlade.test.tsx (../../test-utils/render -> ../../../core/test-utils/render)
  • Fix broken import paths and mock targets in preferences.test.ts (use @/framework/stores/* aliases matching actual source imports)
  • Add jsdom polyfills for document.queryCommandSupported and window.matchMedia in test setup (required by Monaco editor)

All 45 test suites (298 tests) now pass.

Test plan

  • npx vitest run passes all 298 tests across 45 suites
  • CI pipeline passes (Biome lint, TypeScript check, Frontend tests, Rust clippy, Rust tests)

- Fix broken import paths in DiffBlade.test.tsx and preferences.test.ts
- Add jsdom polyfills for document.queryCommandSupported and
  window.matchMedia (required by Monaco editor in test environment)
@phmatray phmatray changed the base branch from develop to main March 9, 2026 09:25
phmatray added 2 commits March 9, 2026 10:25
@testing-library/react requires @testing-library/dom as a peer
dependency, but it was not explicitly listed in package.json,
causing CI to fail with "Cannot find module '@testing-library/dom'".
@phmatray phmatray merged commit bd7235f into main Mar 9, 2026
3 of 4 checks passed
@phmatray phmatray deleted the fix/ci-frontend-tests branch March 9, 2026 09:28
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