From d119569c0a1d9b101f3e0f3961379cb3cecf0fd0 Mon Sep 17 00:00:00 2001 From: Vahid Najafi Date: Thu, 29 Aug 2024 20:43:20 +0200 Subject: [PATCH 1/2] chore: change the name of coverage command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a347c3..22e56d3 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "test": "jest", "test:watch": "jest --watch", "test:cov": "jest --coverage", - "open:cover": "npm run test:cov && open-cli ./coverage/index.html" + "test:cov:open": "npm run test:cov && open-cli ./coverage/index.html" }, "private": true, "devDependencies": { From a53ac648e0d94b9bc4d11c886c818e8359177734 Mon Sep 17 00:00:00 2001 From: Vahid Najafi Date: Thu, 29 Aug 2024 20:45:36 +0200 Subject: [PATCH 2/2] docs: add more badges to README --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b95f43d..bd9b1d6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ ![design-pattern-cover](assets/cover.jpg) [![Automated Tests Passing](https://github.com/vahidvdn/realworld-design-patterns/actions/workflows/ci.yml/badge.svg)](https://github.com/vahidvdn/realworld-design-patterns/actions/workflows/ci.yml) +[![codecov](https://codecov.io/github/vahidvdn/realworld-design-patterns/graph/badge.svg?token=E21ZMGM3M9)](https://codecov.io/github/vahidvdn/realworld-design-patterns) ![Nx](https://img.shields.io/badge/Powered%20by-Nx-0ca5e9) ![License](https://img.shields.io/badge/License-MIT-blue.svg) +![GitHub User's stars](https://img.shields.io/github/stars/vahidvdn%2Frealworld-design-patterns) # Real World Design Patterns 🗺️ Explore real-world scenarios and best practices for design patterns in this comprehensive repository. Elevate your software design skills with practical examples and insightful discussions. ✨ This workspace has been generated by [Nx, Smart Monorepos · Fast CI.](https://nx.dev) ✨ @@ -55,10 +57,24 @@ $ npm run -w PATTERN_NAME start:bad ## Run Tests -In order to run tests, run the following command. (add :watch to run it in watch mode): +In order to run tests, run the following command. (add `:watch` to run it in watch mode): ``` -$ npm run test:watch +$ npm run test +``` + +## Test Coverage + +Run the following command to evaluate test coverage: + +``` +$ npm run test:cov +``` + +To see the coverage report, just run: + +``` +$ npm run test:cov:open ``` ## Contributing