From 8472d18701c27fbe27a3e95671049078e744e1af Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 6 Dec 2024 17:08:02 +0900 Subject: [PATCH] =?UTF-8?q?env(unitest):=20test=20coverage=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=84=A4=EC=A0=95=20=EB=B0=8F=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/unit.test.yml | 2 +- packages/ui/jest.config.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit.test.yml b/.github/workflows/unit.test.yml index 8a5a518..1c6eb60 100644 --- a/.github/workflows/unit.test.yml +++ b/.github/workflows/unit.test.yml @@ -29,7 +29,7 @@ jobs: corepack prepare yarn@4.5.3 --activate - name: Install dependencies - run: yarn install --immutable --inline-builds + run: yarn install --immutable - name: Run tests with coverage run: yarn test --coverage diff --git a/packages/ui/jest.config.js b/packages/ui/jest.config.js index 6d9fc80..d02e555 100644 --- a/packages/ui/jest.config.js +++ b/packages/ui/jest.config.js @@ -10,5 +10,16 @@ export default { transform: { '^.+\\.(ts|tsx)$': ['ts-jest'], '\\.css$': 'jest-transform-css' + }, + collectCoverage: true, + coverageDirectory: 'coverage', + coverageReporters: ['json-summary', 'text', 'lcov'], + coverageThreshold: { + global: { + branches: 80, + functions: 80, + lines: 80, + statements: 80 + } } } \ No newline at end of file