Welcome to the Calculator project! This project is a simple calculator that can perform basic arithmetic operations like addition, subtraction, multiplication, and addition. I first created this Calculator project back in 2021. I've come back to it and given it a spruce-up by making the JS code more tider and adding in Jest Unit Testing.
To use the calculator, follow these steps:
- Open the
index.html
file in your web browser. - Use the buttons on the calculator to enter the numbers and operations you want to perform.
- The calculator will diaplay the result of your calculation in the output field.
We have used Jest to test the functionality of the calculator featrure of this website.Jest is a testing framework that ensures that the code works as expected and reduces the likelihood of bugs or errors.
To run the tests, follow these steps:
- Open the project in your code editor.
- Open a terminal window and navigate to the project directory.
- Run the command
npm install
to install the necessary dependancies. - Run the command
npm test
to run the tests.
Thank you for using my Calculator project. We hope it helps you with your arithmetic calculations.