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',
|
2023-10-02 15:01:03 +03:00
|
|
|
includeSource: ['./{src,shared,ydoc-server}/**/*.{ts,vue}'],
|
2023-09-05 01:27:33 +03:00
|
|
|
exclude: [...configDefaults.exclude, 'e2e/*'],
|
|
|
|
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
|