cherry-studio/tests/__mocks__/renderer
fullex 773e9eac32 feat: enhance mock services for improved testing capabilities
- Updated `CacheService` mock to include TTL support and type-safe memory and shared cache methods, enhancing the accuracy of cache behavior during tests.
- Refactored `DataApiService` mock to implement realistic HTTP methods and subscription handling, including retry configuration and request management, improving the fidelity of API interactions in tests.
- Enhanced `useDataApi` mocks to align with actual hook signatures, providing a more accurate simulation of data fetching and mutation behaviors, including loading and error states.
- Introduced utility functions for managing mock state and triggering subscription callbacks, streamlining the testing process for components relying on these services.
2026-01-04 10:24:35 +08:00
..
CacheService.ts feat: enhance mock services for improved testing capabilities 2026-01-04 10:24:35 +08:00
DataApiService.ts feat: enhance mock services for improved testing capabilities 2026-01-04 10:24:35 +08:00
PreferenceService.ts fix: typecheck/test:lint/format:check 2025-09-16 15:26:36 +08:00
useCache.ts feat(cache): enhance shared cache functionality and synchronization in main 2025-12-29 23:56:27 +08:00
useDataApi.ts feat: enhance mock services for improved testing capabilities 2026-01-04 10:24:35 +08:00
usePreference.ts fix: typecheck/test:lint/format:check 2025-09-16 15:26:36 +08:00