import { defineConfig } from 'vitest/config';
import { fileURLToPath } from 'node:url';

const r = (p: string) => fileURLToPath(new URL(p, import.meta.url));

export default defineConfig({
  resolve: {
    alias: {
      '@': r('./src'),
      '@i18n': r('./src/i18n'),
      '@lib': r('./src/lib'),
      '@components': r('./src/components'),
      '@layouts': r('./src/layouts'),
      '@styles': r('./src/styles'),
      '@scripts': r('./src/scripts'),
    },
  },
  test: {
    environment: 'node',
    include: ['test/**/*.test.ts'],
  },
});
