38 lines
903 B
TypeScript
38 lines
903 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import { defineVitestProject } from '@nuxt/test-utils/config'
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
projects: [
|
|
await defineVitestProject({
|
|
test: {
|
|
name: 'unit',
|
|
include: ['test/unit/**/*.{test,spec}.ts'],
|
|
environment: 'nuxt',
|
|
environmentOptions: {
|
|
nuxt: {
|
|
domEnvironment: 'happy-dom'
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
await defineVitestProject({
|
|
test: {
|
|
name: 'integration',
|
|
include: ['test/integration/**/*.{test,spec}.ts'],
|
|
environment: 'nuxt',
|
|
environmentOptions: {
|
|
nuxt: {
|
|
domEnvironment: 'happy-dom',
|
|
mock: {
|
|
intersectionObserver: true,
|
|
indexedDb: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
]
|
|
}
|
|
})
|