From 82d8d02697e534bcfbeffe7f9438ca60c72230d9 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Wed, 31 May 2023 17:30:14 +0530 Subject: [PATCH] test: Add coverage script (#6634) Add coverage script --- package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package.json b/package.json index 4556cb5f..246c785a 100644 --- a/package.json +++ b/package.json @@ -96,6 +96,15 @@ }, "homepage": ".", "jest": { + "collectCoverageFrom": [ + "src/**/*.{js,jsx,ts,tsx}" + ], + "coveragePathIgnorePatterns": [ + "/locales", + "/src/packages/excalidraw/dist/", + "/src/packages/excalidraw/types", + "/src/packages/excalidraw/example" + ], "transformIgnorePatterns": [ "node_modules/(?!(roughjs|points-on-curve|path-data-parser|points-on-path|browser-fs-access)/)" ], @@ -128,6 +137,7 @@ "test:typecheck": "tsc", "test:update": "yarn test:app --updateSnapshot --watchAll=false", "test": "yarn test:app", + "test:coverage": "react-scripts test --passWithNoTests --coverage --watchAll", "autorelease": "node scripts/autorelease.js", "prerelease": "node scripts/prerelease.js", "release": "node scripts/release.js"