Skip to content

Commit 187feb2

Browse files
committed
feat(coverage): exclude index.ts from coverage requirements
Index.ts is a re-export module with no testable logic. Excluding from coverage calculation to focus on actual implementation files. - Add src/index.ts to coverage exclude list - Add c8 ignore comments to index.ts for documentation - Coverage now accurately reflects testable code - Current baseline: 74.65% statements (target: 97%) The index-exports.test.mts validates the public API surface.
1 parent 942a856 commit 187feb2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.config/vitest.coverage.config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const baseCoverageConfig: CoverageOptions = {
2626
'**/*.mjs',
2727
'**/*.cjs',
2828
'src/types.ts',
29+
'src/index.ts',
2930
'perf/**',
3031
// Explicit root-level exclusions
3132
'/scripts/**',

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Provides the SocketSdk class and utility functions for Socket security analysis API interactions.
44
*/
55

6+
/* c8 ignore start - Re-export module, no testable logic */
67
// Import from our modules.
78
import { DEFAULT_USER_AGENT, httpAgentNames, publicPolicy } from './constants'
89
import {
@@ -134,3 +135,4 @@ export {
134135

135136
// Re-export constants.
136137
export { DEFAULT_USER_AGENT, httpAgentNames, publicPolicy }
138+
/* c8 ignore stop */

0 commit comments

Comments
 (0)