- Fix os module mock pattern for Vitest v4 in proxy-ide-config tests - Fix enterprise oauth_client_key expectations in cloudHandler-sync and token-manager-parity tests - Fix proxy-controller integration test argument expectations - Add missing proxy-parity JSON fixtures (OpenAI tools, Anthropic tool-use, Gemini SSE) - Add reasoning_content mapping to convertClaudeToOpenAIResponse - Fix google-api service test env var cache leak with resetModules + dynamic imports - Fix proxy-metrics timer tests by calling onModuleInit in beforeEach - Fix locale-sensitive number formatting in StatCard tests - Add missing test files to version control (components, hooks, ipc, mocks, server, utils) - Fix CI workflows: testing.yaml (use vitest run, add type-check job, npm cache), lint.yaml and format.yaml (add npm cache, concurrency, fix job names)
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import { defineConfig } from 'vitest/config';
|
|
import path from 'path';
|
|
import viteTsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
export default defineConfig({
|
|
plugins: [viteTsconfigPaths()],
|
|
resolve: {
|
|
alias: [
|
|
{ find: 'keytar', replacement: path.resolve(process.cwd(), './src/tests/unit/mocks/keytar.ts') },
|
|
{ find: 'better-sqlite3', replacement: path.resolve(process.cwd(), './src/tests/unit/mocks/better-sqlite3.ts') },
|
|
],
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'happy-dom',
|
|
include: ['src/tests/unit/**/*.{test,spec}.{ts,tsx}', 'src/tests/integration/**/*.{test,spec}.{ts,tsx}'],
|
|
exclude: ['src/tests/e2e/**/*'],
|
|
setupFiles: ['src/tests/unit/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html', 'json'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'src/tests/',
|
|
'src/mocks/',
|
|
'**/*.config.*',
|
|
'**/*.d.ts',
|
|
'.vite/',
|
|
'forge.config.ts',
|
|
],
|
|
thresholds: {
|
|
lines: 40,
|
|
functions: 40,
|
|
branches: 30,
|
|
statements: 40,
|
|
},
|
|
},
|
|
},
|
|
});
|