Initial vitest setup

This commit is contained in:
2025-05-26 20:02:53 +02:00
parent 3c6e767954
commit e5569fc4a5
7 changed files with 1050 additions and 100 deletions

21
app/vitest.config.ts Normal file
View File

@@ -0,0 +1,21 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
define: {
'window.API_BASE_URL': JSON.stringify('http://localhost:8080/api/v1'),
},
});