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:
parent
04f174f6bb
commit
71b14fb464
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ export default defineConfig({
|
||||||
test: {
|
test: {
|
||||||
// Default configuration
|
// Default configuration
|
||||||
globals: true,
|
globals: true,
|
||||||
setupFiles: ['./tests/setup.ts'],
|
setupFiles: ['./tests/test-setup.ts', './tests/setup.ts'],
|
||||||
testTimeout: 120000, // 120 seconds for TensorFlow operations
|
testTimeout: 120000, // 120 seconds for TensorFlow operations
|
||||||
hookTimeout: 120000,
|
hookTimeout: 120000,
|
||||||
// Run tests in parallel with limited pool
|
// Run tests in parallel with limited pool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue