Files
gridpilot.gg/vitest.config.ts
2025-12-15 13:46:07 +01:00

33 lines
1.3 KiB
TypeScript

import { defineConfig } from 'vitest/config';
import path from 'path';
export default defineConfig({
test: {
globals: true,
watch: false,
environment: 'jsdom',
setupFiles: ['tests/setup/vitest.setup.ts'],
include: ['tests/**/*.{test,spec}.?(c|m)[jt]s?(x)', 'core/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
exclude: [
// Do not run library-internal tests from dependencies
'node_modules/**',
// Playwright-based smoke suite is executed via `npm run smoke:website`
// using Playwright CLI and must not be picked up by Vitest.
'tests/smoke/website-pages.spec.ts',
],
},
resolve: {
alias: {
'@gridpilot/shared-result': path.resolve(__dirname, 'core/shared/result/Result.ts'),
'@gridpilot/automation': path.resolve(__dirname, 'core/automation'),
'@gridpilot/automation/*': path.resolve(__dirname, 'core/automation/*'),
'@gridpilot/testing-support': path.resolve(__dirname, 'core/testing-support'),
'@gridpilot/media': path.resolve(__dirname, 'core/media'),
'@': path.resolve(__dirname, 'apps/website'),
'@/*': path.resolve(__dirname, 'apps/website/*'),
// Support TS-style "core/*" imports used in tests
packages: path.resolve(__dirname, 'packages'),
'core/*': path.resolve(__dirname, 'core/*'),
},
},
});