Fix vitest setup: correct @testing-library/jest-dom import and install dependencies

- Fixed incorrect import path from '@testing-library/jest-dom/vitest' to '@testing-library/jest-dom'
- Installed missing dependencies with pnpm install
- Fixed ESLint warnings by properly typing global mocks
- Resolves test setup issues for hash-based navigation modal tests

Addresses comment from @mrubens in PR #227
This commit is contained in:
Roo Code 2025-07-08 12:34:06 +00:00
parent 8826ed6829
commit 19b6fa3624

View file

@ -1,12 +1,12 @@
import '@testing-library/jest-dom/vitest';
import '@testing-library/jest-dom';
global.ResizeObserver = vi.fn().mockImplementation(() => ({
(global as any).ResizeObserver = vi.fn().mockImplementation(() => ({
observe: vi.fn(),
unobserve: vi.fn(),
disconnect: vi.fn(),
}));
global.IntersectionObserver = vi.fn().mockImplementation(() => ({
(global as any).IntersectionObserver = vi.fn().mockImplementation(() => ({
observe: vi.fn(),
unobserve: vi.fn(),
disconnect: vi.fn(),