- Replace direct fetch() with fetchWithHeaders across entire codebase
- Replace axios.create() with createAxiosWithHeaders in all services
- Update tests to properly mock network client adapters
- Fix hoisting issues in test mocks for axios instances
- Ensure all network calls now support header injection
This completes Step 2: integrating the header registry infrastructure with all existing HTTP clients in the codebase.
Use vi.mock() with factory function to ensure axios mock is set up before module imports. This fixes test failures caused by the store creating axios client at module level.
Fixes test execution in CI
- Move axios mock setup before store import to ensure client is mocked
- Set up default successful responses for customer API endpoints
- Fix TypeScript issues with isAxiosError mock type