A modern React-based calculator application built to demonstrate robust testing practices. This project includes unit tests, test coverage reporting, and a clean UI with Tailwind CSS.
Explore the live version of the calculator here: SimpleCalci
Experience the features and functionality directly in your browser.
- Basic Arithmetic Operations: Perform addition, subtraction, multiplication, and division with ease.
- Error Handling: Handles edge cases like division by zero gracefully.
- Unit Testing: Comprehensive tests to ensure the reliability of the Calculator class.
- Test Coverage Reporting: Detailed coverage statistics to evaluate test completeness.
- React Frontend: Interactive UI for the calculator, built using React.
- Tailwind CSS: Utility-first CSS framework for a responsive and modern design.
This project showcases various testing concepts using Vitest:
- Unit Testing: Test individual functions in the Calculator class.
- Test Suites and Cases: Organized test scenarios for better maintainability.
- Error Testing: Validate proper error handling (e.g., division by zero).
- Edge Case Coverage: Ensure robustness for scenarios like negative numbers and large values.
- Test Coverage Report: Analyze the coverage percentage of the codebase.
- React: Modern UI library for building the frontend.
- Vitest: Lightning-fast unit testing framework.
- Tailwind CSS: Utility-first CSS framework for a clean and responsive design.
- Vite: Next-generation frontend tooling for fast development and builds.
git clone https://github.com/sharryXheisenberg/FrontEnd_calculator_testing_project.git
cd react-calculatornpm installnpm run devnpm run testnpm run coverage- Install the project dependencies:
npm install- Start the development server with the following command:
npm run devOpen the app in your browser at http://localhost:5173.
- Build the Project for Production
npm run build- Preview Production Build
npm run preview- Lint the Code
npm run lintFor any queries or suggestions, feel free to reach out via GitHub Issues.
This project is licensed under the MIT License.