Skip to content

as40/string-calculator-tdd

Repository files navigation

String Calculator TDD Kata

This project implements the String Calculator kata using Test-Driven Development (TDD).

TDD Requirements

  1. Empty string returns 0
  2. Single number returns the number
  3. Two comma-separated numbers return their sum
  4. Multiple comma-separated numbers return their sum
  5. Support newline delimiters
  6. Support custom delimiters
  7. Throw exception for negative numbers

Getting Started

This project will be built step by step using TDD methodology with proper RED-GREEN-REFACTOR cycles.

Each commit will demonstrate the TDD process:

  • RED: Write a failing test
  • GREEN: Write minimal code to make the test pass
  • REFACTOR: Improve the code while keeping tests green

Tech Stack

  • React + Vite
  • Vitest for testing
  • JavaScript ES6+

Development

# Install dependencies
npm install

# Run tests
npm run test

# Run tests once
npm run test:run

# Start development server
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published