0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00
verdaccio/packages/plugins/ui-theme/vitest.config.mjs
Marc Bernard 0225c80663
chore(ui): vitest follow-ups (#4993)
* chore(ui): vitest follow-ups

* markdown plugin
2024-12-11 21:12:49 +01:00

35 lines
887 B
JavaScript

import react from '@vitejs/plugin-react';
import path from 'node:path';
import { plugin as markdown } from 'vite-plugin-markdown';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./vitest/setup.ts'],
exclude: ['node_modules', './build/'],
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
assetsInclude: ['**/*.md'],
alias: {
// https://github.com/vitest-dev/vitest/issues/5664#issuecomment-2093986338
'@emotion/react': path.resolve('node_modules/@emotion/react/dist/emotion-react.cjs.mjs'),
},
},
plugins: [
markdown(),
react({
babel: {
plugins: ['@emotion'],
},
}),
],
resolve: {
alias: {
'verdaccio-ui/utils': path.resolve(__dirname, './src/utils'),
},
},
});