import { defineConfig } from 'vitest/config';
import * as path from 'path';

export default defineConfig({
  test: {
    // Exclude compiled output (tsc outDir) so vitest doesn't also run
    // stale .js copies of the .ts tests. dist/ is gitignored.
    exclude: ['**/node_modules/**', 'dist/**', 'frontend/**'],
    // Isolate storage from the user's live `data/`. JsonStorage reads this and
    // namespaces by worker, so tests never touch real ML data and parallel
    // files don't race the same JSON. The dir is gitignored + disposable.
    env: {
      PRIORITY_FORGE_DATA_DIR: path.resolve(__dirname, '.vitest-data'),
    },
  },
});
