Repository: anuraghazra/github-readme-stats
Pull request #2849 (2023-06-17 22:43:58)

Stats card: show started and answered discussions stats
![изображение](https://github.com/anuraghazra/github-readme-stats/assets/53787217/fde1315e-a834-4784-92a1-3532cdf4cd16)


codecov[bot]: ## [Codecov](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra) Report
Patch coverage: **`100.00`**% and project coverage change: **`+0.01`** :tada:
> Comparison is base [(`b70b089`)](https://app.codecov.io/gh/anuraghazra/github-readme-stats/commit/b70b089b8e9f2379177e01614c6b3b8074e500b0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra) 97.62% compared to head [(`c9b306e`)](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra) 97.63%.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master    #2849      +/-   ##
==========================================
+ Coverage   97.62%   97.63%   +0.01%     
==========================================
  Files          24       24              
  Lines        4876     4912      +36     
  Branches      449      450       +1     
==========================================
+ Hits         4760     4796      +36     
  Misses        115      115              
  Partials        1        1              
```


| [Impacted Files](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra) | Coverage Δ | |
|---|---|---|
| [src/cards/stats-card.js](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra#diff-c3JjL2NhcmRzL3N0YXRzLWNhcmQuanM=) | `100.00% <100.00%> (ø)` | |
| [src/common/icons.js](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra#diff-c3JjL2NvbW1vbi9pY29ucy5qcw==) | `100.00% <100.00%> (ø)` | |
| [src/fetchers/stats-fetcher.js](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra#diff-c3JjL2ZldGNoZXJzL3N0YXRzLWZldGNoZXIuanM=) | `93.01% <100.00%> (+0.26%)` | :arrow_up: |
| [src/translations.js](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra#diff-c3JjL3RyYW5zbGF0aW9ucy5qcw==) | `99.78% <100.00%> (+<0.01%)` | :arrow_up: |


</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/anuraghazra/github-readme-stats/pull/2849?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra).   
:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Anurag+Hazra).

vercel[bot]: [vc]: #hIw548Ke8lFOAgOu/CWNKMW4u5WBu7iK2p0kEVqh5dg=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJnaXRodWItcmVhZG1lLXN0YXRzIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL2dpdGh1Yi1yZWFkbWUtc3RhdHMtdGVhbS9naXRodWItcmVhZG1lLXN0YXRzLzRnRUNXYnhtWk1tZlFNN1MzYmJRUmNaS3k2a2oiLCJwcmV2aWV3VXJsIjoiZ2l0aHViLXJlYWRtZS1zdGF0cy1naXQtc3RhdHNjYS1iNWYyMDAtZ2l0aHViLXJlYWRtZS1zdGF0cy10ZWFtLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQifV19
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Updated (UTC) |
| :--- | :----- | :------ | :------ |
| **github-readme-stats** | ✅ Ready ([Inspect](https://vercel.com/github-readme-stats-team/github-readme-stats/4gECWbxmZMmfQM7S3bbQRcZKy6kj)) | [Visit Preview](https://github-readme-stats-git-statsca-b5f200-github-readme-stats-team.vercel.app) | Jun 17, 2023 10:44pm |



Patch:
diff --git a/readme.md b/readme.md
index 6b5fe93..6c37694 100644
--- a/readme.md
+++ b/readme.md
@@ -151,7 +151,7 @@ You can pass a query parameter `&hide=` to hide any specific stats with comma-se
 
 You can pass a query parameter `&show=` to show any specific additional stats with comma-separated values.
 
-> Options: `&show=reviews`
+> Options: `&show=reviews,discussions_started,discussions_answered`
 
 ```md
 ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show=reviews)
@@ -314,7 +314,7 @@ You can provide multiple comma-separated values in the bg\_color option to rende
 *   `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
 *   `ring_color` - Color of the rank circle *(hex color)*. Defaults to the theme ring color if it exists and otherwise the title color.
 *   `number_format` - Switch between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
-*   `show` - Show [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`) *(Comma-separated values)*. Default: `[] (blank array)`.
+*   `show` - Show [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started` or `discussions_answered`) *(Comma-separated values)*. Default: `[] (blank array)`.
 
 > **Note**
 > When hide\_rank=`true`, the minimum card width is 270 px + the title length and padding.
@@ -541,9 +541,9 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
 
 ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&hide=contribs,issues)
 
-*   Showing addition stats
+*   Showing additional stats
 
-![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show=reviews)
+![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show=reviews,discussions_started,discussions_answered)
 
 *   Showing icons
 
diff --git a/src/cards/stats-card.js b/src/cards/stats-card.js
index 034c45e..79b0076 100644
--- a/src/cards/stats-card.js
+++ b/src/cards/stats-card.js
@@ -86,6 +86,8 @@ const renderStatsCard = (stats = {}, options = {}) => {
     totalIssues,
     totalPRs,
     totalReviews,
+    totalDiscussionsStarted,
+    totalDiscussionsAnswered,
     contributedTo,
     rank,
   } = stats;
@@ -176,6 +178,24 @@ const renderStatsCard = (stats = {}, options = {}) => {
     value: totalIssues,
     id: "issues",
   };
+
+  if (show.includes("discussions_started")) {
+    STATS.discussions_started = {
+      icon: icons.discussions_started,
+      label: i18n.t("statcard.discussions-started"),
+      value: totalDiscussionsStarted,
+      id: "discussions_started",
+    };
+  }
+  if (show.includes("discussions_answered")) {
+    STATS.discussions_answered = {
+      icon: icons.discussions_answered,
+      label: i18n.t("statcard.discussions-answered"),
+      value: totalDiscussionsAnswered,
+      id: "discussions_answered",
+    };
+  }
+
   STATS.contribs = {
     icon: icons.contribs,
     label: i18n.t("statcard.contribs"),
diff --git a/src/common/I18n.js b/src/common/I18n.js
index 48242af..8d80a85 100644
--- a/src/common/I18n.js
+++ b/src/common/I18n.js
@@ -9,15 +9,17 @@ class I18n {
   }
 
   t(str) {
+    const locale = this.locale || this.fallbackLocale;
+
     if (!this.translations[str]) {
       throw new Error(`${str} Translation string not found`);
     }
 
-    if (!this.translations[str][this.locale || this.fallbackLocale]) {
-      throw new Error(`${str} Translation locale not found`);
+    if (!this.translations[str][locale]) {
+      throw new Error(`'${str}' translation not found for locale '${locale}'`);
     }
 
-    return this.translations[str][this.locale || this.fallbackLocale];
+    return this.translations[str][locale];
   }
 }
 
diff --git a/src/common/icons.js b/src/common/icons.js
index 949ce65..4368375 100644
--- a/src/common/icons.js
+++ b/src/common/icons.js
@@ -7,6 +7,8 @@ const icons = {
   contribs: `<path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"/>`,
   fork: `<path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>`,
   reviews: `<path fill-rule="evenodd" d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"/>`,
+  discussions_started: `<path fill-rule="evenodd" d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z" />`,
+  discussions_answered: `<path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z" />`,
 };
 
 /**
diff --git a/src/fetchers/stats-fetcher.js b/src/fetchers/stats-fetcher.js
index 931f3e2..21d2611 100644
--- a/src/fetchers/stats-fetcher.js
+++ b/src/fetchers/stats-fetcher.js
@@ -63,6 +63,12 @@ const GRAPHQL_STATS_QUERY = `
       followers {
         totalCount
       }
+      repositoryDiscussions {
+        totalCount
+      }
+      repositoryDiscussionComments(onlyAnswers: true) {
+        totalCount
+      }
       ${GRAPHQL_REPOS_FIELD}
     }
   }
@@ -190,6 +196,8 @@ const fetchStats = async (
     totalCommits: 0,
     totalIssues: 0,
     totalStars: 0,
+    totalDiscussionsStarted: 0,
+    totalDiscussionsAnswered: 0,
     contributedTo: 0,
     rank: { level: "C", percentile: 100 },
   };
@@ -232,6 +240,8 @@ const fetchStats = async (
   stats.totalReviews =
     user.contributionsCollection.totalPullRequestReviewContributions;
   stats.totalIssues = user.openIssues.totalCount + user.closedIssues.totalCount;
+  stats.totalDiscussionsStarted = user.repositoryDiscussions.totalCount;
+  stats.totalDiscussionsAnswered = user.repositoryDiscussionComments.totalCount;
   stats.contributedTo = user.repositoriesContributedTo.totalCount;
 
   // Retrieve stars while filtering out repositories to be hidden.
diff --git a/src/fetchers/types.d.ts b/src/fetchers/types.d.ts
index a810c6c..3a86205 100644
--- a/src/fetchers/types.d.ts
+++ b/src/fetchers/types.d.ts
@@ -22,6 +22,8 @@ export type StatsData = {
   totalCommits: number;
   totalIssues: number;
   totalStars: number;
+  totalDiscussionsStarted: number;
+  totalDiscussionsAnswered: number;
   contributedTo: number;
   rank: { level: string; percentile: number };
 };
diff --git a/src/translations.js b/src/translations.js
index 9934946..1c66c28 100644
--- a/src/translations.js
+++ b/src/translations.js
@@ -228,6 +228,66 @@ const statCardLocales = ({ name, apostrophe }) => {
       vi: "Tổng Số PR Đã Xem Xét",
       se: "Totalt antal granskade PR",
     },
+    "statcard.discussions-started": {
+      ar: "مجموع بدء المناقشات",
+      cn: "发起的讨论总数",
+      "zh-tw": "發起的討論總數",
+      cs: "Celkem zahájených diskusí",
+      de: "Gesamt gestartete Diskussionen",
+      en: "Total Discussions Started",
+      bn: "সর্বমোট আলোচনা শুরু",
+      es: "Discusiones totales iniciadas",
+      fr: "Nombre total de discussions lancées",
+      hu: "Összes megkezdett megbeszélés",
+      it: "Discussioni totali avviate",
+      ja: "開始されたディスカッションの総数",
+      kr: "시작된 토론 총 수",
+      nl: "Totaal gestarte discussies",
+      "pt-pt": "Total de Discussões Iniciadas",
+      "pt-br": "Total de Discussões Iniciadas",
+      np: "कुल चर्चा सुरु",
+      el: "Σύνολο Συζητήσεων που Ξεκίνησαν",
+      ru: "Всего начатых дискуссий",
+      "uk-ua": "Всього розпочатих дискусій",
+      id: "Total Diskusi Dimulai",
+      my: "Jumlah Perbincangan Bermula",
+      sk: "Celkový počet začatých diskusií",
+      tr: "Başlatılan Toplam Tartışma",
+      pl: "Łącznie rozpoczętych dyskusji",
+      uz: "Boshlangan muzokaralar soni",
+      vi: "Tổng Số Thảo Luận Bắt Đầu",
+      se: "Totalt antal diskussioner startade",
+    },
+    "statcard.discussions-answered": {
+      ar: "مجموع الردود على المناقشات",
+      cn: "回复的讨论总数",
+      "zh-tw": "回覆的討論總數",
+      cs: "Celkem zodpovězených diskusí",
+      de: "Gesamt beantwortete Diskussionen",
+      en: "Total Discussions Answered",
+      bn: "সর্বমোট আলোচনা উত্তর",
+      es: "Discusiones totales respondidas",
+      fr: "Nombre total de discussions répondues",
+      hu: "Összes megválaszolt megbeszélés",
+      it: "Discussioni totali risposte",
+      ja: "回答されたディスカッションの総数",
+      kr: "답변된 토론 총 수",
+      nl: "Totaal beantwoorde discussies",
+      "pt-pt": "Total de Discussões Respondidas",
+      "pt-br": "Total de Discussões Respondidas",
+      np: "कुल चर्चा उत्तर",
+      el: "Σύνολο Συζητήσεων που Απαντήθηκαν",
+      ru: "Всего отвеченных дискуссий",
+      "uk-ua": "Всього відповідей на дискусії",
+      id: "Total Diskusi Dibalas",
+      my: "Jumlah Perbincangan Dijawab",
+      sk: "Celkový počet zodpovedaných diskusií",
+      tr: "Toplam Cevaplanan Tartışma",
+      pl: "Łącznie odpowiedzianych dyskusji",
+      uz: "Javob berilgan muzokaralar soni",
+      vi: "Tổng Số Thảo Luận Đã Trả Lời",
+      se: "Totalt antal diskussioner besvarade",
+    },
   };
 };
 


Test patch:
diff --git a/tests/api.test.js b/tests/api.test.js
index 4fb965e..7155799 100644
--- a/tests/api.test.js
+++ b/tests/api.test.js
@@ -12,6 +12,9 @@ const stats = {
   totalCommits: 200,
   totalIssues: 300,
   totalPRs: 400,
+  totalReviews: 50,
+  totalDiscussionsStarted: 10,
+  totalDiscussionsAnswered: 40,
   contributedTo: 50,
   rank: null,
 };
@@ -33,11 +36,16 @@ const data_stats = {
       repositoriesContributedTo: { totalCount: stats.contributedTo },
       contributionsCollection: {
         totalCommitContributions: stats.totalCommits,
+        totalPullRequestReviewContributions: stats.totalReviews,
       },
       pullRequests: { totalCount: stats.totalPRs },
       openIssues: { totalCount: stats.totalIssues },
       closedIssues: { totalCount: 0 },
       followers: { totalCount: 0 },
+      repositoryDiscussions: { totalCount: stats.totalDiscussionsStarted },
+      repositoryDiscussionComments: {
+        totalCount: stats.totalDiscussionsAnswered,
+      },
       repositories: {
         totalCount: 1,
         nodes: [{ stargazers: { totalCount: 100 } }],
diff --git a/tests/fetchStats.test.js b/tests/fetchStats.test.js
index 3b0f915..3945d75 100644
--- a/tests/fetchStats.test.js
+++ b/tests/fetchStats.test.js
@@ -18,6 +18,8 @@ const data_stats = {
       openIssues: { totalCount: 100 },
       closedIssues: { totalCount: 100 },
       followers: { totalCount: 100 },
+      repositoryDiscussions: { totalCount: 10 },
+      repositoryDiscussionComments: { totalCount: 40 },
       repositories: {
         totalCount: 5,
         nodes: [
@@ -119,6 +121,8 @@ describe("Test fetchStats", () => {
       totalPRs: 300,
       totalReviews: 50,
       totalStars: 300,
+      totalDiscussionsStarted: 10,
+      totalDiscussionsAnswered: 40,
       rank,
     });
   });
@@ -150,6 +154,8 @@ describe("Test fetchStats", () => {
       totalPRs: 300,
       totalReviews: 50,
       totalStars: 300,
+      totalDiscussionsStarted: 10,
+      totalDiscussionsAnswered: 40,
       rank,
     });
   });
@@ -187,6 +193,8 @@ describe("Test fetchStats", () => {
       totalPRs: 300,
       totalReviews: 50,
       totalStars: 300,
+      totalDiscussionsStarted: 10,
+      totalDiscussionsAnswered: 40,
       rank,
     });
   });
@@ -215,6 +223,8 @@ describe("Test fetchStats", () => {
       totalPRs: 300,
       totalReviews: 50,
       totalStars: 200,
+      totalDiscussionsStarted: 10,
+      totalDiscussionsAnswered: 40,
       rank,
     });
   });
@@ -241,6 +251,8 @@ describe("Test fetchStats", () => {
       totalPRs: 300,
       totalReviews: 50,
       totalStars: 400,
+      totalDiscussionsStarted: 10,
+      totalDiscussionsAnswered: 40,
       rank,
     });
   });
@@ -267,6 +279,8 @@ describe("Test fetchStats", () => {
       totalPRs: 300,
       totalReviews: 50,
       totalStars: 300,
+      totalDiscussionsStarted: 10,
+      totalDiscussionsAnswered: 40,
       rank,
     });
   });
@@ -293,6 +307,8 @@ describe("Test fetchStats", () => {
       totalPRs: 300,
       totalReviews: 50,
       totalStars: 300,
+      totalDiscussionsStarted: 10,
+      totalDiscussionsAnswered: 40,
       rank,
     });
   });
diff --git a/tests/renderStatsCard.test.js b/tests/renderStatsCard.test.js
index 6a47f94..a2fd5b6 100644
--- a/tests/renderStatsCard.test.js
+++ b/tests/renderStatsCard.test.js
@@ -17,6 +17,8 @@ const stats = {
   totalIssues: 300,
   totalPRs: 400,
   totalReviews: 50,
+  totalDiscussionsStarted: 10,
+  totalDiscussionsAnswered: 50,
   contributedTo: 500,
   rank: { level: "A+", score: 40 },
 };
@@ -42,6 +44,12 @@ describe("Test renderStatsCard", () => {
 
     // Default hidden stats
     expect(queryByTestId(document.body, "reviews")).not.toBeInTheDocument();
+    expect(
+      queryByTestId(document.body, "discussions_started"),
+    ).not.toBeInTheDocument();
+    expect(
+      queryByTestId(document.body, "discussions_answered"),
+    ).not.toBeInTheDocument();
   });
 
   it("should have proper name apostrophe", () => {
@@ -73,16 +81,18 @@ describe("Test renderStatsCard", () => {
     expect(queryByTestId(document.body, "prs")).toBeNull();
     expect(queryByTestId(document.body, "contribs")).toBeNull();
     expect(queryByTestId(document.body, "reviews")).toBeNull();
+    expect(queryByTestId(document.body, "discussions_started")).toBeNull();
+    expect(queryByTestId(document.body, "discussions_answered")).toBeNull();
   });
 
-  it("should show total reviews", () => {
+  it("should show additional stats", () => {
     document.body.innerHTML = renderStatsCard(stats, {
-      show: ["reviews"],
+      show: ["reviews", "discussions_started", "discussions_answered"],
     });
 
     expect(
       document.body.getElementsByTagName("svg")[0].getAttribute("height"),
-    ).toBe("220");
+    ).toBe("270");
 
     expect(queryByTestId(document.body, "stars")).toBeDefined();
     expect(queryByTestId(document.body, "commits")).toBeDefined();
@@ -90,6 +100,8 @@ describe("Test renderStatsCard", () => {
     expect(queryByTestId(document.body, "prs")).toBeDefined();
     expect(queryByTestId(document.body, "contribs")).toBeDefined();
     expect(queryByTestId(document.body, "reviews")).toBeDefined();
+    expect(queryByTestId(document.body, "discussions_started")).toBeDefined();
+    expect(queryByTestId(document.body, "discussions_answered")).toBeDefined();
   });
 
   it("should hide_rank", () => {