Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/augustodevjs/typescript-jest-test

🔧 TDD with SOLID using typescript
https://github.com/augustodevjs/typescript-jest-test

Last synced: 6 days ago
JSON representation

🔧 TDD with SOLID using typescript

Awesome Lists containing this project

README

        

## TDD with TypeScript

This is a project that simulates a shopping cart, following the principles of SOLID. SOLID is a set of principles in object-oriented programming that help create cleaner, more modular, and easier-to-maintain code.

In this project, several classes have been implemented, such as Customer, Discount, Order, Product, and Shopping Cart. These classes are responsible for different parts of the shopping cart, such as managing customers, products, orders, and discounts.

To ensure code quality, automated tests have been added using Jest and the Test-Driven Development (TDD) methodology. This means that even before implementing a new feature, tests were created to ensure that it worked correctly. This approach reduces the risk of errors and increases confidence in the code.

Additionally, test coverage was performed to assess the extent of test coverage and ensure that all parts of the code were being tested. With a test coverage of 100%, we can have high confidence in the code quality.

In summary, this project is an excellent example of how to follow the principles of SOLID and add automated tests to ensure code quality. Through this approach, we can create cleaner, more modular, and easier-to-maintain code, while reducing the risk of errors and increasing confidence in the project.