wip
This commit is contained in:
@@ -2,60 +2,14 @@ import { defineConfig } from 'vitest/config';
|
||||
import path from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './apps/website'),
|
||||
packages: path.resolve(__dirname, './packages'),
|
||||
'packages/': path.resolve(__dirname, './packages'),
|
||||
'@gridpilot': path.resolve(__dirname, './packages'),
|
||||
'@gridpilot/shared-result': path.resolve(__dirname, 'packages/shared/result/Result.ts'),
|
||||
'@gridpilot/automation': path.resolve(__dirname, 'packages/automation'),
|
||||
'@gridpilot/automation/*': path.resolve(__dirname, 'packages/automation/*'),
|
||||
},
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
watch: false,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./tests/setup.ts'],
|
||||
include: ['tests/**/*.test.ts', 'tests/**/*.test.tsx'],
|
||||
exclude: [
|
||||
'tests/e2e/**/*',
|
||||
'tests/smoke/companion-boot.smoke.test.ts',
|
||||
'tests/smoke/electron-app.smoke.test.ts',
|
||||
],
|
||||
env: {
|
||||
NODE_ENV: 'test',
|
||||
},
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: [
|
||||
'node_modules/',
|
||||
'tests/',
|
||||
'**/*.d.ts',
|
||||
'**/*.config.*',
|
||||
'**/dist/**',
|
||||
],
|
||||
},
|
||||
// Longer timeout for integration tests
|
||||
testTimeout: 30000,
|
||||
server: {
|
||||
deps: {
|
||||
inline: ['jsdom', 'parse5'],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Separate E2E config - used when running test:e2e script
|
||||
export const e2eConfig = defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
include: ['tests/e2e/**/*.e2e.test.ts'],
|
||||
env: {
|
||||
NODE_ENV: 'test',
|
||||
},
|
||||
// E2E tests need longer timeouts due to browser operations
|
||||
testTimeout: 120000,
|
||||
hookTimeout: 60000,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user