Test/frontend api unit tests
Frontend API Unit Tests Implemented unit tests for frontend API services using Vitest and Axios mocking to validate request handling, responses, and error scenarios, ensuring reliable integration with backend APIs. API calls are tested in isolation using mocked network requests, avoiding any real backend dependency. Both successful responses and failure scenarios, including authentication and server errors, are covered. The tests verify correct request payloads, response mapping, and error-handling logic. Overall, this improves code quality, reduces regressions, and enables safer future refactoring.
Edited by mondyagu abhilash