Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/augustodevjs/typescript-jest-test
- Owner: augustodevjs
- Created: 2023-03-20T00:09:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-16T20:07:08.000Z (over 1 year ago)
- Last Synced: 2023-07-16T21:29:55.394Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.