import { defineConfig } from 'vitest/config' import path from 'path' export default defineConfig({ test: { globals: true, environment: 'node', setupFiles: ['./test/setup.ts'], include: ['test/**/*.{test,spec}.{ts,tsx}', 'src/**/*.test.ts'], exclude: [ '**/node_modules/**', '**/dist/**', 'test/routes/internal-sandbox.test.ts', 'src/routes/repos.test.ts', ], coverage: { provider: 'v8', reporter: ['text-summary', 'html'], thresholds: { statements: 80, branches: 80, functions: 80, lines: 80, }, }, env: { NODE_ENV: 'test', PORT: '3001', DATABASE_PATH: ':memory:', AUTH_SECRET: 'test-secret-for-encryption', WORKSPACE_PATH: '/tmp/test-workspace', }, }, resolve: { alias: { 'bun:sqlite': path.resolve(__dirname, './test/mocks/bun-sqlite.ts'), 'bun:test': path.resolve(__dirname, './test/mocks/bun-test.ts'), }, }, })