From 37852ea7bbe2ec61545f8d4fa2a16d038a828099 Mon Sep 17 00:00:00 2001
From: Ariya Hidayat <ariya@metabase.com>
Date: Thu, 12 May 2022 05:40:54 -0700
Subject: [PATCH] Exclude storybook (*.stories) from coverage collection
 (#22661)

We are not running tests which exercise those *.stories files, hence it
is not fair to include them in the coverage analysis.
---
 jest.unit.conf.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/jest.unit.conf.json b/jest.unit.conf.json
index 0a457db8a35..8bd38653e95 100644
--- a/jest.unit.conf.json
+++ b/jest.unit.conf.json
@@ -26,7 +26,8 @@
   "coverageReporters": ["text", "html", "lcov"],
   "collectCoverageFrom": [
     "frontend/src/**/*.{js,jsx,ts,tsx}",
-    "enterprise/frontend/src/**/*.{js,jsx,ts,tsx}"
+    "enterprise/frontend/src/**/*.{js,jsx,ts,tsx}",
+    "**/*.stories.{js,jsx,ts,tsx}"
   ],
   "coveragePathIgnorePatterns": [
     "/node_modules/",
-- 
GitLab