This project implements a simple string calculator as described in the String Calculator TDD Kata. The goal is to practice Test-Driven Development (TDD) by gradually building up the functionality of a calculator that can add numbers provided in a string format.
- Handles an empty string
- Adds numbers separated by commas
- Handles an arbitrary number of numbers
- Supports new lines as delimiters
- Supports custom delimiters
- Throws an exception for negative numbers, listing all negative numbers in the error message
-
Clone the repository:
git clone https://github.com/Independent-programmer/string-calculator.git cd string-calculator
-
Install dependencies:
npm install
-
Build the project:
npm run build
-
Test the project
npm run test