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: {
|
2024-12-09 23:43:41 +03:00
|
|
|
reporters: process.env.CI ? ['dot', 'github-actions'] : ['default'],
|
2023-09-05 01:27:33 +03:00
|
|
|
environment: 'jsdom',
|
2024-12-02 18:44:39 +03:00
|
|
|
includeSource: ['./src/**/*.{ts,tsx,vue}'],
|
2024-11-27 17:09:59 +03:00
|
|
|
exclude: [...configDefaults.exclude, 'integration-test/**/*'],
|
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,
|
2024-12-02 18:44:39 +03:00
|
|
|
setupFiles: './src/dashboard/test/setup.ts',
|
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
|