feat: test coverage of ComboControl and CheckboxFilter

This commit is contained in:
Ilia Mashkov
2026-01-08 13:14:04 +03:00
parent 36a326817d
commit fc00717359
16 changed files with 2300 additions and 357 deletions

View File

@@ -3,10 +3,29 @@ import { cleanup } from '@testing-library/svelte';
import {
afterEach,
expect,
vi,
} from 'vitest';
// Import Tailwind CSS styles for component tests
import '$app/styles/app.css';
expect.extend(matchers);
afterEach(() => {
cleanup();
});
// Mock window.matchMedia for components that use it
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: vi.fn().mockImplementation((query: string) => ({
matches: false,
media: query,
onchange: null,
addListener: vi.fn(),
removeListener: vi.fn(),
addEventListener: vi.fn(),
removeEventListener: vi.fn(),
dispatchEvent: vi.fn(),
})),
});