add unit tests
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-02-24 11:33:37 +01:00
parent e17c82de2f
commit 4fc3738adf
19 changed files with 1427 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import { defineConfig } from 'vite';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { resolve } from 'node:path';
@@ -27,4 +27,23 @@ export default defineConfig({
],
},
},
test: {
environment: 'jsdom',
setupFiles: ['./tests/setup.ts'],
coverage: {
provider: 'v8',
include: ['src/**/*.{ts,tsx}'],
exclude: [
'src/**/*.stories.{ts,tsx}',
'src/styles/**',
'src/components/types.ts',
'src/types/**',
],
thresholds: {
lines: 95,
functions: 95,
branches: 90,
},
},
},
});