- packages/llm: use nullish coalescing (??) in GeminiProvider constructor so explicit empty-string apiKey is not overridden by env var - dashboards/admin-web,tracker-web: exclude .next/ from vitest test glob to prevent Next.js internal test files from being picked up - services/cowork-service: use platform-safe .kill() instead of SIGTERM which is invalid on Windows - packages/use-keyboard-shortcuts: add @testing-library/react devDep - scripts/npmrc.template: use https:// for Gitea registry Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
globals: true,
|
|
exclude: ['e2e/**', 'node_modules/**', '.next/**'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
exclude: [
|
|
'node_modules/**',
|
|
'.next/**',
|
|
'coverage/**',
|
|
'**/*.test.ts',
|
|
'**/*.test.tsx',
|
|
'**/*.config.*',
|
|
'**/e2e/**',
|
|
],
|
|
// Vitest reads these keys directly under `thresholds` (the legacy `global`
|
|
// nesting is ignored by the v8 provider and silently disables enforcement).
|
|
thresholds: {
|
|
branches: 80,
|
|
functions: 80,
|
|
lines: 80,
|
|
statements: 80,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
// Workspace packages (e.g. @bytelyst/charts) can resolve their own React
|
|
// copy via the pnpm store; dedupe so SSR render tests use a single React
|
|
// instance (avoids the "Invalid hook call" dual-package hazard).
|
|
dedupe: ['react', 'react-dom'],
|
|
},
|
|
});
|