Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .config/isolated-tests.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"tests": [
"test/unit/quota-utils-error-handling.test.mts",
"test/unit/json-parsing-edge-cases.test.mts",
"test/unit/getapi-sendapi-methods.test.mts",
"test/unit/socket-sdk-retry.test.mts",
"test/unit/entitlements.test.mts",
"test/unit/getapi-sendapi-methods.test.mts",
"test/unit/json-parsing-edge-cases.test.mts",
"test/unit/socket-sdk-batch.test.mts",
"test/unit/socket-sdk-check-malware.test.mts",
"test/unit/socket-sdk-json-parsing-errors.test.mts",
"test/unit/socket-sdk-strict-types.test.mts"
"test/unit/socket-sdk-new-api-methods.test.mts",
"test/unit/socket-sdk-retry.test.mts",
"test/unit/socket-sdk-stream-limits.test.mts",
"test/unit/socket-sdk-strict-types.test.mts",
"test/unit/socket-sdk-success-paths.test.mts"
]
}
6 changes: 3 additions & 3 deletions .config/vitest.config.isolated.mts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export default defineConfig({
pool: 'forks',
poolOptions: {
forks: {
// Use single fork for coverage, parallel otherwise
singleFork: isCoverageEnabled,
maxForks: isCoverageEnabled ? 1 : 8,
// Each test file gets its own fork for nock isolation.
singleFork: false,
maxForks: isCoverageEnabled ? 4 : 8,
minForks: isCoverageEnabled ? 1 : 2,
},
},
Expand Down
13 changes: 9 additions & 4 deletions .config/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ export default defineConfig({
exclude: [
'**/node_modules/**',
'**/dist/**',
'test/unit/quota-utils-error-handling.test.mts',
'test/unit/json-parsing-edge-cases.test.mts',
'test/unit/getapi-sendapi-methods.test.mts',
'test/unit/socket-sdk-retry.test.mts',
'test/unit/entitlements.test.mts',
'test/unit/getapi-sendapi-methods.test.mts',
'test/unit/json-parsing-edge-cases.test.mts',
'test/unit/socket-sdk-batch.test.mts',
'test/unit/socket-sdk-check-malware.test.mts',
'test/unit/socket-sdk-json-parsing-errors.test.mts',
'test/unit/socket-sdk-new-api-methods.test.mts',
'test/unit/socket-sdk-retry.test.mts',
'test/unit/socket-sdk-stream-limits.test.mts',
'test/unit/socket-sdk-strict-types.test.mts',
'test/unit/socket-sdk-success-paths.test.mts',
],
reporters:
process.env.TEST_REPORTER === 'json' ? ['json', 'default'] : ['default'],
Expand Down
13 changes: 6 additions & 7 deletions .config/vitest.coverage.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,20 @@ export const baseCoverageConfig: CoverageOptions = {

/**
* Standard coverage thresholds for main test suite.
* Baseline: 73.04% (after removing problematic tests that timeout in coverage mode)
*/
export const mainCoverageThresholds = {
lines: 73,
functions: 90,
branches: 55,
statements: 73,
branches: 82,
functions: 98,
lines: 93,
statements: 93,
}

/**
* Relaxed coverage thresholds for isolated tests (lower bar for specialized tests).
*/
export const isolatedCoverageThresholds = {
lines: 35,
branches: 49,
functions: 35,
branches: 50,
lines: 35,
statements: 35,
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Socket Badge](https://socket.dev/api/badge/npm/package/@socketsecurity/sdk)](https://socket.dev/npm/package/@socketsecurity/sdk)
[![CI](https://github.com/SocketDev/socket-sdk-js/actions/workflows/ci.yml/badge.svg)](https://github.com/SocketDev/socket-sdk-js/actions/workflows/ci.yml)
![Coverage](https://img.shields.io/badge/coverage-40%25-orange)
![Coverage](https://img.shields.io/badge/coverage-96%25-brightgreen)

[![Follow @SocketSecurity](https://img.shields.io/twitter/follow/SocketSecurity?style=social)](https://twitter.com/SocketSecurity)
[![Follow @socket.dev on Bluesky](https://img.shields.io/badge/Follow-@socket.dev-1DA1F2?style=social&logo=bluesky)](https://bsky.app/profile/socket.dev)
Expand Down
Loading