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)',
      'adapters/**/*.{test,spec}.?(c|m)[jt]s?(x)',
      'apps/**/*.{test,spec}.?(c|m)[jt]s?(x)',
    ],
    exclude: [
      'node_modules/**',
      'tests/smoke/website-pages.spec.ts',
    ],
  },
  resolve: {
    alias: {
      '@core': path.resolve(__dirname, './core'),
      '@adapters': path.resolve(__dirname, './adapters'),
      '@testing': path.resolve(__dirname, './testing'),
    },
  },
});