cherry-studio/src
Jason Young 9218ac237b
test: add comprehensive tests for ApiClientFactory (#8124)
* test: add comprehensive tests for ApiClientFactory

- Test all special ID client mappings (aihubmix, new-api, ppio)
- Test all standard provider type mappings
- Test edge cases and default behavior
- Test isOpenAIProvider utility function
- Achieve full coverage of factory logic

* test: fix ApiClientFactory test for OpenAIResponseAPIClient changes

- Add getClient mock method to OpenAIResponseAPIClient mock
- Fix provider id from 'azure' to 'azure-openai' to match actual configuration
- Ensure tests properly reflect the new OpenAIResponseAPIClient implementation

* test: refactor ApiClientFactory tests and move isOpenAIProvider to utils

- Simplify test data creation with createTestProvider helper
- Move isOpenAIProvider to utils and fix vertexai handling
- Update related imports
2025-07-17 16:59:18 +08:00
..
main feat: add data parsing functionality in handleProvidersProtocolUrl (#8218) 2025-07-17 13:15:29 +08:00
preload [1.5.0-rc] Feat/memory (#7689) 2025-07-15 10:24:41 +08:00
renderer test: add comprehensive tests for ApiClientFactory (#8124) 2025-07-17 16:59:18 +08:00