Setting coverage thresholds
5 min readLast updated 2026-04-27New
Define minimum coverage requirements at the project, module, and file level.
Coverage thresholds ensure critical code is always tested. Set different thresholds for different parts of your codebase.
Project-level threshold
// checkstudio.config.js
module.exports = {
coverage: {
global: { lines: 80, branches: 70, functions: 75 },
},
};javascriptModule-level overrides
coverage: {
global: { lines: 80 },
overrides: [
{ path: 'src/auth/**', lines: 95, branches: 90 },
{ path: 'src/utils/**', lines: 60 },
],
}javascriptGrace periods
New projects get a 30-day grace period before thresholds are enforced. This gives teams time to build coverage without blocking CI.
Was this article helpful?
Still have questions?
Our support team is here to help. Reach out directly or search the docs.