test: Add global mock embedding setup to prevent timeouts

- Create test-setup.ts with global vi.mock for embedding module
- Mock all embedding functions to avoid loading Transformers.js
- Configure vitest to load mock setup before all tests
- Fixes timeout issues in majority of test files

Tests now run significantly faster with deterministic mock embeddings
This commit is contained in:
David Snelling 2025-08-18 09:32:48 -07:00
parent 04f174f6bb
commit 71b14fb464

View file

@ -4,7 +4,7 @@ export default defineConfig({
test: {
// Default configuration
globals: true,
setupFiles: ['./tests/setup.ts'],
setupFiles: ['./tests/test-setup.ts', './tests/setup.ts'],
testTimeout: 120000, // 120 seconds for TensorFlow operations
hookTimeout: 120000,
// Run tests in parallel with limited pool