forked from nikita/muzika-gromche
28 lines
765 B
TypeScript
28 lines
765 B
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import { playwright } from '@vitest/browser-playwright'
|
|
import { configDefaults, defineConfig, mergeConfig } from 'vitest/config'
|
|
import viteConfig from './vite.config'
|
|
|
|
export default mergeConfig(
|
|
viteConfig,
|
|
defineConfig({
|
|
define: {
|
|
// See https://github.com/vitest-dev/vitest/issues/6872
|
|
'process.env': JSON.stringify({}),
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
exclude: [...configDefaults.exclude, 'e2e/**'],
|
|
root: fileURLToPath(new URL('./', import.meta.url)),
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
// https://vitest.dev/config/browser/playwright
|
|
instances: [
|
|
{ browser: 'firefox' },
|
|
],
|
|
},
|
|
},
|
|
}),
|
|
)
|