An open API service indexing awesome lists of open source software.

https://github.com/ankita0399/string-calculator

Incubyte Assessment - String Calculator implemented with TDD in JavaScript (Jest)
https://github.com/ankita0399/string-calculator

javascript jest kata software-craftsmanship tdd

Last synced: 3 months ago
JSON representation

Incubyte Assessment - String Calculator implemented with TDD in JavaScript (Jest)

Awesome Lists containing this project

README

          


Incubyte Assessment


String Calculator TDD Kata


Implementation of the String Calculator kata using Test Driven Development (TDD).


---

## Features

- **Returns 0** for empty string
- **Returns number itself** for single input
- **Supports multiple numbers** separated by commas
- **Supports new line** (`\n`) as a delimiter
- **Supports custom delimiters** (e.g., `//;\n1;2`)
- **Throws exception for negative numbers** (lists all negatives)

---

## Getting Started

Clone the repository and run tests locally:

```bash
git clone https://github.com/ankita0399/string-calculator.git
cd string-calculator
npm install
npm test
```

---

## Screenshots


All tests passing


All tests passing