feat(frontend): Add formSnapshotComparison test, add test setup

This commit is contained in:
2026-03-02 08:49:12 +01:00
parent fea2ca8a3b
commit 7d18824c32
8 changed files with 125 additions and 88 deletions

View File

@@ -4,18 +4,32 @@ import { defineVitestProject } from '@nuxt/test-utils/config'
export default defineConfig({
test: {
projects: [
{
test: {
name: 'unit',
include: ['test/{e2e,unit}/*.{test,spec}.ts'],
environment: 'node'
}
},
await defineVitestProject({
test: {
name: 'nuxt',
include: ['test/nuxt/*.{test,spec}.ts'],
environment: 'nuxt'
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
}
}
}
}
})
]