33 lines
1.3 KiB
TypeScript
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)', 'packages/**/*.{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, 'packages/shared/result/Result.ts'),
|
|
'@gridpilot/automation': path.resolve(__dirname, 'packages/automation'),
|
|
'@gridpilot/automation/*': path.resolve(__dirname, 'packages/automation/*'),
|
|
'@gridpilot/testing-support': path.resolve(__dirname, 'packages/testing-support'),
|
|
'@gridpilot/media': path.resolve(__dirname, 'packages/media'),
|
|
'@': path.resolve(__dirname, 'apps/website'),
|
|
'@/*': path.resolve(__dirname, 'apps/website/*'),
|
|
// Support TS-style "packages/*" imports used in tests
|
|
packages: path.resolve(__dirname, 'packages'),
|
|
'packages/*': path.resolve(__dirname, 'packages/*'),
|
|
},
|
|
},
|
|
}); |