feat: test coverage of ComboControl and CheckboxFilter
This commit is contained in:
@@ -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(),
|
||||
})),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user