primevue-mirror/apps/showcase/config.setup.js

18 lines
433 B
JavaScript

import { config } from '@vue/test-utils';
import { defaultOptions } from 'primevue/config';
config.global.mocks['$primevue'] = {
config: defaultOptions
};
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: vi.fn().mockImplementation((query) => ({
matches: false,
media: query,
onchange: null,
addEventListener: vi.fn(),
removeEventListener: vi.fn()
}))
});