- Updated the mock implementation of useDocLink to strip leading slashes from paths, aligning with actual implementation behavior.
- This change ensures that the generated documentation URLs are consistent and accurate, improving the reliability of tests that depend on this mock.
These adjustments enhance the overall stability and correctness of the testing suite for document processing components.
- Updated the function to use a deterministic counter for IDs, reducing flakiness in tests.
- Ensured the ID counter resets before each test to maintain reproducibility.
- Adjusted assertions in the tests to explicitly check for error handling when the documents array is empty, improving clarity and reliability of edge case testing.
- Fixed a link in the tests to ensure it points to the correct documentation URL.
These changes enhance the robustness and reliability of the testing suite for document processing components.
- Introduced new test files for Processing and EmbeddingProcess components, covering rendering, props variations, edge cases, and memoization.
- Added mock implementations for external dependencies to facilitate testing.
- Enhanced Jest configuration to handle module resolution for lodash and ky.
- Created a mock for the ky HTTP client to avoid ESM issues in Jest tests.
- Updated Processing component to handle optional chaining for retrieval method.
This commit significantly improves test coverage and stability for the document processing features.