571fe5bc7c
- Create backend xUnit test project with Moq and FluentAssertions - Add test utilities: TestDataFactory, MockHttpContext, TestUserClaims - Create AuthControllerTests with comprehensive auth scenarios - Install Jest and React Testing Library for frontend - Configure jest.config.ts and jest.setup.ts with Next.js support - Add test scripts to package.json
1.6 KiB
1.6 KiB
Why
The RacePlanner project currently lacks a comprehensive test suite, making it difficult to ensure code quality and prevent regressions. We need to establish testing infrastructure for both the .NET backend and Next.js frontend to enable confident development and deployments.
What Changes
- Backend Unit Tests: Create a .NET test project with xUnit for unit testing Controllers, Services, and Data layer
- Frontend Unit Tests: Set up Jest/React Testing Library for React components and hooks
- Integration Tests: Create end-to-end integration tests that verify frontend-backend communication via API calls
- Test Automation: Configure test runners with npm scripts for automated execution
- CI/CD Integration: Add GitHub Actions workflow to run tests on pull requests
Capabilities
New Capabilities
backend-unit-tests: .NET xUnit test project for API Controllers, Services, and Data layerfrontend-unit-tests: Jest/React Testing Library setup for Next.js components and hooksintegration-tests: End-to-end tests verifying API communication between frontend and backendtest-automation: Automated test runners and CI/CD integration
Modified Capabilities
- None (this change adds testing infrastructure without modifying existing functionality)
Impact
- Backend: New
backend.Tests/project directory added, new test dependencies in.csproj - Frontend: Additional dev dependencies for Jest and React Testing Library
- CI/CD: New GitHub Actions workflow in
.github/workflows/for automated testing - Build Process: New npm scripts (
test,test:backend,test:frontend,test:integration) added