Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lauraatenciob/tdd-practice
Basic calculator with TDD
https://github.com/lauraatenciob/tdd-practice
reactjs tdd vitest
Last synced: about 1 month ago
JSON representation
Basic calculator with TDD
- Host: GitHub
- URL: https://github.com/lauraatenciob/tdd-practice
- Owner: lauraatenciob
- Created: 2024-09-10T19:15:35.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-09-10T19:19:12.000Z (5 months ago)
- Last Synced: 2024-11-15T17:42:52.144Z (3 months ago)
- Topics: reactjs, tdd, vitest
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calculator App - TDD Learning Project
This is a project built to practice and demonstrate **Test-Driven Development (TDD)** and automated testing techniques using modern tools like **Vitest**, **React.js**, and **React Testing Library**.
## Project Purpose
The goal of this project is to learn and improve skills in:
- **Test-Driven Development (TDD):** Writing tests before implementing functionality.
- **Automated Testing:** Using tools like Vitest and React Testing Library to ensure code correctness.
- **React Development:** Building a simple, functional calculator using React.js.## Tech Stack
- **React.js:** A JavaScript library for building user interfaces.
- **Vitest:** A fast, lightweight testing framework for JavaScript, perfect for TDD.
- **React Testing Library:** A set of utilities to test React components by simulating user interactions.## Development
Follow these steps to get the project up and running on your local machine:
### Prerequisites
You need to have **Node.js** and **npm** installed. If you don't have them, you can download from [Node.js official website](https://nodejs.org/).
### Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/calculator-tdd.git
cd calculator-tdd
```2. Install the dependencies:
```bash
npm install
```### Avaliable Scripts
To start the application in development mode, run:
```bash
npm run dev
```
To execute the test suite and see the results, run:```bash
npm test
```## Learning Outcomes
- Understand the fundamentals of TDD and how to apply it in real-world projects.
- Gain experience in writing unit tests and integration tests for React applications.
- Learn how to use Vitest for efficient test execution.
- Understand how to simulate user interactions with React Testing Library.## Contributions
Since this project is intended for learning, feel free to fork the repository and experiment with it. If you'd like to contribute, you can create a pull request with your improvements or new features.
## License
This project is open-source and available under the MIT License.