import { defineConfig } from 'vitest/config'; import path from 'path'; export default defineConfig({ test: { projects: [ { extends: true, test: { name: 'core', globals: true, environment: 'node', include: ['core/src/**/*.spec.ts'], }, }, { extends: true, test: { name: 'nestjs', globals: true, environment: 'node', include: ['nestjs/src/**/*.spec.ts'], }, }, { extends: true, test: { name: 'ml', globals: true, environment: 'node', include: ['ml/src/**/*.spec.ts'], }, }, { extends: true, test: { name: 'reporting', globals: true, environment: 'node', include: ['reporting/src/**/*.spec.ts'], }, }, { extends: true, test: { name: 'bull-adapter', globals: true, environment: 'node', include: ['bull-adapter/src/**/*.spec.ts'], }, }, { extends: true, test: { name: 'admin-backend', globals: true, environment: 'node', include: ['admin/backend/src/**/*.spec.ts'], }, }, { extends: true, esbuild: { jsx: 'automatic', }, test: { name: 'admin-frontend', globals: true, environment: 'happy-dom', include: ['admin/frontend/src/**/*.spec.{ts,tsx}'], setupFiles: ['admin/frontend/src/test/setup.ts'], }, }, ], exclude: ['node_modules/', '**/dist/', 'e2e/'], coverage: { provider: 'v8', reporter: ['text', 'json', 'html'], exclude: [ 'node_modules/', '**/dist/', '**/*.spec.ts', '**/*.test.ts', '**/index.ts', '**/test/**/*', 'e2e/', 'docs/', ], }, }, resolve: { alias: { '@lilith/queue/core': path.resolve(__dirname, './core/src/index.ts'), '@lilith/queue/nestjs': path.resolve(__dirname, './nestjs/src/index.ts'), '@lilith/queue/ml': path.resolve(__dirname, './ml/src/index.ts'), '@lilith/queue/reporting': path.resolve(__dirname, './reporting/src/index.ts'), '@lilith/queue/bull-adapter': path.resolve(__dirname, './bull-adapter/src/index.ts'), '@lilith/queue/admin/backend': path.resolve(__dirname, './admin/backend/src/index.ts'), '@lilith/queue/admin/frontend': path.resolve(__dirname, './admin/frontend/src/index.ts'), }, }, });