Loading...
Loading...
Compare original and translation side by side
jestjest.config.jsjest.config.jsonvitestvitest.config.tsvitest.config.jsmochacoverageThresholdcoverage.thresholds.nycrc.json.husky/*.test.**.spec.*jestjest.config.jsjest.config.jsonvitestvitest.config.tsvitest.config.jsmochacoverageThresholdcoverage.thresholds.nycrc.json.husky/*.test.**.spec.*undefinedundefinedundefinedundefinednpx husky install.husky/pre-commitpreparenpx husky install.husky/pre-commitpreparejest --coverage --watchAll=falsevitest --coverage --runnycc8jest --coverage --watchAll=falsevitest --coverage --runnycc8jest.config.jsoncoverageThresholdvitest.config.ts/js.nycrc.jsonjest.config.jsoncoverageThresholdvitest.config.ts/js.nycrc.json--root <path>--threshold <number>--fail-on-below--no-fail-on-below--skip-if-no-tests--dry-run--root <path>--threshold <number>--fail-on-below--no-fail-on-below--skip-if-no-tests--dry-run.husky-test-coverage.json{
"coverageThreshold": {
"lines": 80,
"branches": 75,
"functions": 80,
"statements": 80
},
"failOnCoverageBelowThreshold": true,
"skipIfNoTests": false
}.husky-test-coverage.json{
"coverageThreshold": {
"lines": 80,
"branches": 75,
"functions": 80,
"statements": 80
},
"failOnCoverageBelowThreshold": true,
"skipIfNoTests": false
}package.json{
"huskyTestCoverage": {
"threshold": 80,
"failOnBelow": true
}
}package.json{
"huskyTestCoverage": {
"threshold": 80,
"failOnBelow": true
}
}jestjest.config.jsjest.config.jsonjest.config.jsonnpm test -- --coverage --watchAll=false{
"coverageThreshold": {
"global": {
"lines": 80,
"branches": 75,
"functions": 80,
"statements": 80
}
}
}jestjest.config.jsjest.config.jsonjest.config.jsonnpm test -- --coverage --watchAll=false{
"coverageThreshold": {
"global": {
"lines": 80,
"branches": 75,
"functions": 80,
"statements": 80
}
}
}vitestvitest.config.tsvitest.config.jsnpm test -- --coverage --runimport { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
thresholds: {
lines: 80,
branches: 75,
functions: 80,
statements: 80
}
}
}
})vitestvitest.config.tsvitest.config.jsnpm test -- --coverage --runimport { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
thresholds: {
lines: 80,
branches: 75,
functions: 80,
statements: 80
}
}
}
})mochanycc8.nycrc.jsonnyc --reporter=text --reporter=html npm test{
"check-coverage": true,
"lines": 80,
"branches": 75,
"functions": 80,
"statements": 80,
"reporter": ["text", "text-summary", "html", "lcov"]
}mochanycc8.nycrc.jsonnyc --reporter=text --reporter=html npm test{
"check-coverage": true,
"lines": 80,
"branches": 75,
"functions": 80,
"statements": 80,
"reporter": ["text", "text-summary", "html", "lcov"]
}npm run testyarn testpnpm run testbun run testnpm run testyarn testpnpm run testbun run test| Skill | How It Works Together |
|---|---|
| fullstack-workspace-init | Automatically invoked after scaffolding to set up 80% coverage threshold |
| linter-formatter-init | Both configure Husky; this skill focuses on test coverage, linter-formatter-init focuses on linting/formatting |
| testing-expert | Uses testing patterns and coverage targets from testing-expert skill |
| 技能 | 配合方式 |
|---|---|
| fullstack-workspace-init | 在脚手架搭建后自动调用,设置80%覆盖率阈值 |
| linter-formatter-init | 两者均配置Husky;此技能专注于测试覆盖率,linter-formatter-init专注于代码检查/格式化 |
| testing-expert | 使用testing-expert技能中的测试模式和覆盖率目标 |
fullstack-workspace-initfullstack-workspace-initfullstack-workspace-initfullstack-workspace-initpython3 ~/.claude/skills/husky-test-coverage/scripts/setup-husky-coverage.py \
--root /path/to/project \
--threshold 80python3 ~/.claude/skills/husky-test-coverage/scripts/setup-husky-coverage.py \
--root /path/to/project \
--threshold 80undefinedundefinedundefinedundefined