Skip to content

mnoella/calculatrice

Repository files navigation

Calculator

A comprehensive calculator application developed using Test Driven Development (TDD) methodology as part of a Software Quality and Testing course at MyDigitalSchool.

Overview

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.

Features

  • ✅ 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

Tech Stack

Category Tools
Language TypeScript
UI Framework React
Build Tool Vite
Testing Vitest (unit tests), Playwright (e2e tests)
Code Quality ESLint, Prettier
Package Manager npm

Getting Started

Installation

npm install

Development

npm run dev

Testing

Unit Tests:

npm run test

End-to-End Tests:

npm run test:e2e

View E2E Report:

npx playwright show-report

Build

npm run build

Project Structure

  • src/calculator.ts - Core business logic for calculations and history management
  • src/components/CalculatorUI.tsx - React UI component
  • test/calculator.test.ts - Unit tests
  • e2e/calculator.spec.ts - End-to-end tests

TDD Methodology

This project was developed following the Test Driven Development cycle:

  1. Red - Write failing tests
  2. Green - Implement minimal code to pass tests
  3. Refactor - Improve code structure while maintaining passing tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors