A comprehensive calculator application developed using Test Driven Development (TDD) methodology as part of a Software Quality and Testing course at MyDigitalSchool.
This project demonstrates the implementation of robust business logic components for mathematical operations (addition, subtraction, multiplication) with a complete calculation history feature. The emphasis is placed on code quality, test coverage, and strict adherence to TDD principles.
- ✅ Basic arithmetic operations (addition, subtraction, multiplication)
- 📋 Calculation history with ability to recall previous results
- 🧹 Clear history functionality
- 🎨 Responsive user interface with React
- 📱 Mobile-friendly design
| Category | Tools |
|---|---|
| Language | TypeScript |
| UI Framework | React |
| Build Tool | Vite |
| Testing | Vitest (unit tests), Playwright (e2e tests) |
| Code Quality | ESLint, Prettier |
| Package Manager | npm |
npm installnpm run devUnit Tests:
npm run testEnd-to-End Tests:
npm run test:e2eView E2E Report:
npx playwright show-reportnpm run buildsrc/calculator.ts- Core business logic for calculations and history managementsrc/components/CalculatorUI.tsx- React UI componenttest/calculator.test.ts- Unit testse2e/calculator.spec.ts- End-to-end tests
This project was developed following the Test Driven Development cycle:
- Red - Write failing tests
- Green - Implement minimal code to pass tests
- Refactor - Improve code structure while maintaining passing tests