forked from dxlander/dxlander
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
45 lines (44 loc) · 1.41 KB
/
vitest.config.ts
File metadata and controls
45 lines (44 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { defineConfig } from 'vitest/config';
import * as path from 'path';
export default defineConfig({
test: {
globals: true,
environment: 'node',
setupFiles: ['./tests/setup-integration.ts'],
include: ['tests/**/*.{test,spec}.{js,ts,tsx}'],
exclude: [
'node_modules',
'dist',
'apps/*/dist',
'packages/*/dist',
'apps/web/.next',
'apps/web/**',
'**/*.d.ts',
'tests/e2e/**', // E2E tests run with Playwright, not Vitest
'tests/integration/api/**', // Blocked by pg module ESM issue
'tests/integration/integrations/**', // Blocked by pg module ESM issue
],
testTimeout: 30000,
hookTimeout: 30000,
server: {
deps: {
// Inline workspace packages for proper module resolution
inline: [/@dxlander\/.*/],
// External dependencies that have issues with Vite transformation
external: ['pg', 'pg-native'],
},
},
},
esbuild: {
target: 'node18',
},
resolve: {
alias: {
'@dxlander/database': path.resolve(__dirname, './packages/database/src/index.ts'),
'@dxlander/shared': path.resolve(__dirname, './packages/shared/src/index.ts'),
'@dxlander/ai-agents': path.resolve(__dirname, './packages/ai-agents/src/index.ts'),
},
// Ensure external dependencies like drizzle-orm are properly resolved
conditions: ['node', 'import', 'module', 'browser', 'default'],
},
});