Skip to content

Commit c9e7999

Browse files
committed
chore(test): add jest coverageThreshold gate (per-repo baseline-aware)
Locks in the current coverage floor so regressions fail CI. Threshold is set just below today's measured floor so the gate is informative, not punitive — fresh contributors see the same numbers green.
1 parent fba0f19 commit c9e7999

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"android": "expo start --android",
1111
"ios": "expo start --ios",
1212
"lint": "eslint app/ lib/",
13-
"test": "jest --verbose --passWithNoTests",
13+
"test": "jest --verbose --passWithNoTests --coverage",
1414
"version:patch": "node scripts/bump-version.js patch",
1515
"version:minor": "node scripts/bump-version.js minor",
1616
"version:major": "node scripts/bump-version.js major"
@@ -39,6 +39,14 @@
3939
"preset": "jest-expo",
4040
"transformIgnorePatterns": [
4141
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg)"
42-
]
42+
],
43+
"coverageThreshold": {
44+
"global": {
45+
"statements": 75,
46+
"branches": 55,
47+
"functions": 70,
48+
"lines": 80
49+
}
50+
}
4351
}
4452
}

0 commit comments

Comments
 (0)