Merge commit 'd803bfe2b1fe7f5e219e50ac20d6801a0a58ac75' as 'vendor/ruvector'
This commit is contained in:
75
vendor/ruvector/npm/packages/agentic-synth-examples/vitest.config.ts
vendored
Normal file
75
vendor/ruvector/npm/packages/agentic-synth-examples/vitest.config.ts
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* Vitest Configuration for agentic-synth-examples
|
||||
*/
|
||||
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, resolve } from 'path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
// Test environment
|
||||
environment: 'node',
|
||||
|
||||
// Test files
|
||||
include: ['tests/**/*.test.ts'],
|
||||
exclude: ['node_modules', 'dist', 'build'],
|
||||
|
||||
// Coverage configuration
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html', 'lcov'],
|
||||
include: ['src/**/*.ts'],
|
||||
exclude: [
|
||||
'src/**/*.d.ts',
|
||||
'src/index.ts', // Re-export file
|
||||
'src/dspy/index.ts', // Re-export file
|
||||
'src/types/index.ts', // Type definitions
|
||||
'tests/**',
|
||||
'node_modules/**',
|
||||
'dist/**'
|
||||
],
|
||||
// Coverage thresholds (80%+ target)
|
||||
thresholds: {
|
||||
lines: 80,
|
||||
functions: 80,
|
||||
branches: 75,
|
||||
statements: 80
|
||||
}
|
||||
},
|
||||
|
||||
// Timeouts
|
||||
testTimeout: 10000, // 10 seconds for async operations
|
||||
hookTimeout: 10000,
|
||||
|
||||
// Reporters
|
||||
reporters: ['verbose'],
|
||||
|
||||
// Run tests in sequence to avoid race conditions
|
||||
// with event emitters and shared state
|
||||
sequence: {
|
||||
concurrent: false
|
||||
},
|
||||
|
||||
// Globals
|
||||
globals: true,
|
||||
|
||||
// Mock options
|
||||
mockReset: true,
|
||||
restoreMocks: true,
|
||||
clearMocks: true,
|
||||
|
||||
// Retry failed tests once
|
||||
retry: 1
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, './src'),
|
||||
'@tests': resolve(__dirname, './tests')
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user