Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

38
e2e/node/setup.ts generated Normal file
View File

@@ -0,0 +1,38 @@
// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import { existsSync } from 'fs';
// 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');
// Validate that the test documents directory exists before changing into it.
// If it doesn't exist, log the error to stderr so the before hook failure
// is visible rather than failing silently.
if (!existsSync(testDocumentsDir)) {
console.error(
`[E2E Setup] test_documents directory not found: ${testDocumentsDir}\n` +
`Check that alef.toml [crates.e2e] test_documents_dir is configured correctly.\n` +
`Fixture file paths will not resolve correctly.`
);
process.exit(1);
}
try {
process.chdir(testDocumentsDir);
} catch (error) {
console.error(`[E2E Setup] Failed to change directory to ${testDocumentsDir}: ${error}`);
process.exit(1);
}
// Mark this file as a module so vitest recognizes the setup
export {};