import { resolve } from 'path'
import { defineConfig } from 'vitest/config'

// Stand-alone vitest config. The unit suites exercise the pure logic across
// src/main and src/renderer (buildArgs, validation, datetime, id, jsonStore,
// queueStats, indexer, deeplink, updater guards, …), all of which import
// types/consts from @shared — so we just need that one alias mirrored from
// electron.vite.config.ts.
export default defineConfig({
  resolve: {
    alias: {
      '@shared': resolve('src/shared')
    }
  },
  test: {
    include: ['test/**/*.test.ts'],
    environment: 'node'
  }
})
