Files
Codewalkers/vitest.config.ts
Lukas May 575ad48a55 feat: Add UpdateCredentialsDialog component for re-authenticating accounts
Implements a self-contained dialog that allows users to update credentials
for an existing account without deleting and re-adding it. Supports two
modes: token-based (Tab A) and credentials JSON (Tab B).

Also sets up web component test infrastructure: vitest now includes
apps/web/**/*.test.tsx files with happy-dom environment, @vitejs/plugin-react
for JSX, and @testing-library/{react,jest-dom,user-event} packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 13:27:13 +01:00

33 lines
874 B
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'node:path';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './apps/web/src'),
},
},
test: {
// Enable test globals (describe, it, expect without imports)
globals: true,
env: {
CW_LOG_LEVEL: 'silent',
},
// Test file pattern
include: ['**/*.test.ts', '**/*.test.tsx'],
exclude: ['**/node_modules/**', '**/dist/**', 'packages/**'],
environmentMatchGlobs: [
['apps/web/**', 'happy-dom'],
],
// TypeScript support uses tsconfig.json automatically
// Coverage reporter (optional, for future use)
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
reportsDirectory: './apps/server/coverage',
},
},
});