Skip to content

Commit 0a649ca

Browse files
authored
Merge pull request #52 from frontend-opensource-project/URH-69/test-coverage-setting
[URH-69] 테스트 커버리지 신규
2 parents 42a687e + 1424b80 commit 0a649ca

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ dist-ssr
2424
*.sw?
2525

2626
# ESLINT
27-
.eslintcache
27+
.eslintcache
28+
29+
# Jest Coverage Reports
30+
coverage/

jest.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ const config: JestConfigWithTsJest = {
1111
},
1212
setupFiles: ['jest-canvas-mock', './src/mocks/mockWorker.ts'],
1313
setupFilesAfterEnv: ['./jest.setup.ts'],
14+
coveragePathIgnorePatterns: ['./src/mocks/'],
15+
coverageThreshold: {
16+
global: {
17+
statements: 70,
18+
branches: 70,
19+
functions: 70,
20+
lines: 70,
21+
},
22+
},
1423
};
1524

1625
export default config;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"preview": "vite preview",
1111
"prepare": "husky",
1212
"lint-staged": "lint-staged",
13-
"test": "jest"
13+
"test": "jest",
14+
"coverage":"jest --coverage"
1415
},
1516
"lint-staged": {
1617
"*.{ts,tsx}": [

0 commit comments

Comments
 (0)