Skip to content

Commit 65659f9

Browse files
authored
chore: add unit test coverage thresholds (#609)
1 parent ca3ee1a commit 65659f9

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

packages/amplify-codegen/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
},
4545
"jest": {
4646
"collectCoverage": true,
47+
"coverageThreshold": {
48+
"global": {
49+
"branches": 56,
50+
"functions": 68,
51+
"lines": 73
52+
}
53+
},
4754
"testURL": "http://localhost",
4855
"testRegex": "((\\.|/)(test|spec))\\.(jsx?|tsx?)$",
4956
"moduleFileExtensions": [

packages/appsync-modelgen-plugin/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@
6262
"collectCoverageFrom": [
6363
"src/**/*.ts"
6464
],
65+
"coverageThreshold": {
66+
"global": {
67+
"branches": 80,
68+
"functions": 80,
69+
"lines": 80
70+
}
71+
},
6572
"testRegex": "(src/__tests__/.*.test.ts)$",
6673
"globals": {
6774
"ts-jest": {

packages/graphql-docs-generator/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@
5353
"collectCoverageFrom": [
5454
"src/**/*.ts"
5555
],
56+
"coverageThreshold": {
57+
"global": {
58+
"branches": 64,
59+
"functions": 71,
60+
"lines": 80
61+
}
62+
},
5663
"moduleFileExtensions": [
5764
"ts",
5865
"tsx",

packages/graphql-types-generator/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@
7373
"<rootDir>/src/polyfills.js"
7474
],
7575
"collectCoverage": true,
76+
"coverageThreshold": {
77+
"global": {
78+
"branches": 79,
79+
"functions": 80,
80+
"lines": 80
81+
}
82+
},
7683
"testURL": "http://localhost",
7784
"setupFilesAfterEnv": [
7885
"<rootDir>/test/test-utils/matchers.ts"

0 commit comments

Comments
 (0)