{{ header }}import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
// Change to the configured test-documents directory so that fixture file
// paths like "pdf/fake_memo.pdf" resolve correctly when running vitest
// from e2e/node/. setup.ts lives in e2e/node/; the fixtures dir lives at
// the repository root, two directories up: e2e/node/ -> e2e/ -> root.
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const testDocumentsDir = join(__dirname, '..', '..', '{{ test_documents_dir }}');
process.chdir(testDocumentsDir);