import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    coverage: {
      provider: 'v8' as const,
      reporter: ['text', 'lcov', 'json-summary'],
      reportsDirectory: './coverage',
      include: ['packages/*/src/**/*.{ts,tsx,mts,cts}'],
      exclude: [
        '**/*.spec.{ts,tsx,mts,cts}',
        '**/*.test.{ts,tsx,mts,cts}',
        '**/*.bench.{ts,tsx,mts,cts}',
        '**/spec/**',
        '**/index.{ts,mts,cts}',
        '**/*.d.{ts,mts,cts}',
      ],
    },
    globals: true,
    watch: false,
    projects: [
      {
        test: {
          name: 'node',
          environment: 'node',
          include: ['packages/*/src/spec/**/*.spec.{ts,tsx,mts,cts}'],
        },
      },
    ],
  },
})
