- confugure vitest
parent
1618e6d7db
commit
fa844bda11
|
@ -1,17 +0,0 @@
|
||||||
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()
|
|
||||||
}))
|
|
||||||
});
|
|
|
@ -16,8 +16,7 @@ export default mergeConfig(
|
||||||
provider: 'istanbul',
|
provider: 'istanbul',
|
||||||
reporter: ['text', 'json', 'html']
|
reporter: ['text', 'json', 'html']
|
||||||
},
|
},
|
||||||
setupFiles: [path.resolve(__dirname, './config.setup.js')],
|
setupFiles: [path.resolve(__dirname, './src/config/Config.spec.js')]
|
||||||
include: [path.resolve(__dirname, '../../**/*.spec.js')]
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue