2023-09-05 01:27:33 +03:00
|
|
|
import { fileURLToPath } from 'node:url'
|
2023-09-22 06:43:25 +03:00
|
|
|
import { configDefaults, defineConfig, mergeConfig } from 'vitest/config'
|
2023-09-05 01:27:33 +03:00
|
|
|
import viteConfig from './vite.config'
|
|
|
|
|
2024-07-12 13:45:57 +03:00
|
|
|
const config = mergeConfig(
|
2023-09-05 01:27:33 +03:00
|
|
|
viteConfig,
|
|
|
|
defineConfig({
|
|
|
|
test: {
|
|
|
|
environment: 'jsdom',
|
2024-09-20 19:31:45 +03:00
|
|
|
includeSource: ['./src/**/*.{ts,vue}'],
|
2024-10-11 21:23:02 +03:00
|
|
|
exclude: [...configDefaults.exclude, 'e2e/**/*'],
|
2023-09-05 01:27:33 +03:00
|
|
|
root: fileURLToPath(new URL('./', import.meta.url)),
|
2023-10-19 18:08:56 +03:00
|
|
|
restoreMocks: true,
|
2023-09-05 01:27:33 +03:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
)
|
2024-07-12 13:45:57 +03:00
|
|
|
config.esbuild.dropLabels = config.esbuild.dropLabels.filter((label: string) => label != 'DEV')
|
|
|
|
export default config
|