Skip to content

Commit bea2f10

Browse files
committed
feat(coverage): increase thresholds and update badges to reflect actual coverage
Updated coverage thresholds and badges to reflect the actual src/ directory coverage now that external bundles are properly excluded. Changes: - Increased vitest coverage thresholds: - lines: 1 → 68% - functions: 68 → 70% - branches: 70% (unchanged) - statements: 1 → 68% - Updated README.md badges: - Renamed "Test Coverage" → "Code Coverage" for clarity - Code Coverage: 36.76% → 68.35% (src/ directory only) - Type Coverage: 97.68% (unchanged) - Added Cumulative Coverage: 83.02% (new badge) The thresholds now match the actual src/ directory coverage metrics, ensuring that only source code (not external bundles) is measured against coverage requirements.
1 parent 0ba76b1 commit bea2f10

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.config/vitest.config.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ export default defineConfig({
155155
skipFull: false,
156156
ignoreClassMethods: ['constructor'],
157157
thresholds: {
158-
lines: 1,
159-
functions: 68,
158+
lines: 68,
159+
functions: 70,
160160
branches: 70,
161-
statements: 1,
161+
statements: 68,
162162
},
163163
},
164164
},

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
[![Socket Badge](https://socket.dev/api/badge/npm/package/@socketsecurity/lib)](https://socket.dev/npm/package/@socketsecurity/lib)
44
[![CI](https://github.com/SocketDev/socket-lib/actions/workflows/ci.yml/badge.svg)](https://github.com/SocketDev/socket-lib/actions/workflows/ci.yml)
5-
![Test Coverage](https://img.shields.io/badge/test--coverage-36.76%25-orange)
5+
![Code Coverage](https://img.shields.io/badge/code--coverage-68.35%25-yellow)
66
![Type Coverage](https://img.shields.io/badge/type--coverage-97.68%25-brightgreen)
7+
![Cumulative Coverage](https://img.shields.io/badge/cumulative--coverage-83.02%25-brightgreen)
78

89
[![Follow @SocketSecurity](https://img.shields.io/twitter/follow/SocketSecurity?style=social)](https://twitter.com/SocketSecurity)
910

0 commit comments

Comments
 (0)