Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamal-saadeddin/calc-app-unit-testing
A simple calculator developed during an internship at Foothill, designed to practice unit testing.
https://github.com/jamal-saadeddin/calc-app-unit-testing
aaa-testing test-driven-development unit-testing
Last synced: about 24 hours ago
JSON representation
A simple calculator developed during an internship at Foothill, designed to practice unit testing.
- Host: GitHub
- URL: https://github.com/jamal-saadeddin/calc-app-unit-testing
- Owner: Jamal-SaadEddin
- Created: 2024-05-15T18:15:21.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-20T11:54:56.000Z (6 months ago)
- Last Synced: 2024-05-20T21:17:08.223Z (6 months ago)
- Topics: aaa-testing, test-driven-development, unit-testing
- Language: JavaScript
- Homepage:
- Size: 4.93 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JavaScript Calculator
## Overview
This project is part of an internship assignment at Foothill, focused on developing a JavaScript calculator with an emphasis on writing comprehensive unit tests. The calculator supports basic arithmetic operations such as addition, subtraction, multiplication, and division, and includes robust input validation.## Features
- Performs addition, subtraction, multiplication, and division.
- Validates input types and operators to ensure correct calculations.
- Handles edge cases like division by zero and numbers greater than 1000, which are ignored.
- Developed with test-driven development techniques to ensure functionality and reliability.## Usage
To use the calculator, require the module in your JavaScript code and pass parameters as follows:
```javascript
{
num1: ,
operation1: ,
num2: ,
operation2: ,
num3:
}
```
The calculator executes the operations in sequence and returns the computed result.## Installation
Clone this repository to your local machine to get started. Ensure you have Node.js installed to run the calculator.## Testing
The project includes a `calculator.test.js` file, which demonstrates how to write unit tests for each function and scenario. It is a vital part of the internship's focus on learning test-driven development and achieving high code quality.## Authors
- [Jamal SaadEddin](github.com/Jamal-SaadEddin)## Acknowledgements
- This task is part of the Foothill Technology Solutions Internship Cycle.
- Big thanks to my trainer [@Huthaifa](https://github.com/Huthaifa-Dev)---
Thank you for visiting my project! Feel free to star or contribute to the repository if you find it useful.