movie-night-web/vitest.config.ts

35 lines
805 B
TypeScript
Raw Normal View History

2026-02-16 19:12:00 -06:00
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vitest/config'
import { defineVitestProject } from '@nuxt/test-utils/config'
export default defineConfig({
test: {
projects: [
{
test: {
name: 'unit',
include: ['test/unit/*.{test,spec}.ts'],
environment: 'node',
},
},
await defineVitestProject({
test: {
name: 'nuxt',
include: ['test/nuxt/*.{test,spec}.ts'],
environment: 'nuxt',
environmentOptions: {
nuxt: {
rootDir: fileURLToPath(new URL('.', import.meta.url)),
domEnvironment: 'happy-dom',
},
},
},
}),
],
coverage: {
enabled: true,
provider: 'v8',
},
},
})