This project is an exercise in Test-Driven Development (TDD) using Jest, React, and TypeScript. The main goal of this project was to improve my development skills by following a rigorous TDD approach.
- Apply the Test-Driven Development (TDD) concept by developing a small application.
- Use Jest as the test framework to write unit tests.
- Implement React components following a TDD approach, starting with tests.
- Incorporate TypeScript to enhance code safety and maintainability.
- Test various scenarios, including component unit tests and state management.
- React: A JavaScript library for building user interfaces.
- Jest: A popular JavaScript testing framework.
- TypeScript: A programming language that adds static types to JavaScript.
- HTML/CSS: For the structure and styling of the application.
- The application is a simple counter that allows adding and subtracting values.
- Unit tests were written for each feature, following the TDD approach.
- TypeScript was used to define strong types and ensure code safety.
- Clone this repository to your local machine.
- Ensure you have Node.js and npm installed on your machine.
- Run
pnpm install
to install project dependencies. - Run
pnpm start
to launch the application in development mode. - Run
pnpm test
to execute unit tests with Jest.
Feel free to explore the source code and run the tests to better understand the TDD development process used in this project.