This release represents a major milestone in the development lifecycle, focusing on establishing a Robust Testing Infrastructure and a Scalable State Management system. We have transitioned from basic unit testing to professional-grade integration testing.
- Industry Standard: Replaced hardcoded
axiosmocks with MSW (Mock Service Worker). - Decoupled Logic: Network requests are now intercepted at the network level, allowing tests to run against actual
axioscalls without external dependencies. - Consistency: Centralized all API mock handlers in
src/mocks/handlers.jsfor better maintainability.
- User Journeys: Implemented integration tests for the
DashboardandLoginflows, ensuring data flows correctly between the API, Context, and UI. - Dynamic Testing Utility: Refactored the
rendericustom render function to injectUserProviderandMemoryRouterdynamically, supporting both "Guest" and "Authenticated" test scenarios.
- UserContext API: Robust global state for managing authentication sessions (
login,logout,userstatus). - Protected UI: Dynamic rendering of navigation links based on user authentication state.
- Tailwind Integration: Completely refactored the Dashboard and Login components with a responsive, professional design.
- Skeleton Loading: Added visual feedback for asynchronous data fetching states.
- Frontend: React 18+ & Tailwind CSS
- Routing: React Router 6 (Basename-ready for GitHub Pages)
- Testing: Vitest, React Testing Library, MSW
- Mocking: MSW (REST API handlers)
# To run unit and integration tests
pnpm test