Skip to content

Commit e0f102e

Browse files
committed
test: update config command snapshots for cache settings
- Add cacheEnabled and cacheTtl to help output snapshots - Reflects new API caching configuration options
1 parent 1ba6679 commit e0f102e

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

src/commands/config/cmd-config-auto.test.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ describe('socket config auto', async () => {
3434
- apiBaseUrl -- Base URL of the Socket API endpoint
3535
- apiProxy -- A proxy through which to access the Socket API
3636
- apiToken -- The Socket API token required to access most Socket API endpoints
37+
- cacheEnabled -- Enable API response caching (default: false)
38+
- cacheTtl -- Cache TTL in milliseconds (default: 300000 = 5 minutes)
3739
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
3840
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
3941
- org -- Alias for defaultOrg

src/commands/config/cmd-config-get.test.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ describe('socket config get', async () => {
3434
- apiBaseUrl -- Base URL of the Socket API endpoint
3535
- apiProxy -- A proxy through which to access the Socket API
3636
- apiToken -- The Socket API token required to access most Socket API endpoints
37+
- cacheEnabled -- Enable API response caching (default: false)
38+
- cacheTtl -- Cache TTL in milliseconds (default: 300000 = 5 minutes)
3739
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
3840
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
3941
- org -- Alias for defaultOrg

src/commands/config/cmd-config-set.test.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ describe('socket config get', async () => {
4141
- apiBaseUrl -- Base URL of the Socket API endpoint
4242
- apiProxy -- A proxy through which to access the Socket API
4343
- apiToken -- The Socket API token required to access most Socket API endpoints
44+
- cacheEnabled -- Enable API response caching (default: false)
45+
- cacheTtl -- Cache TTL in milliseconds (default: 300000 = 5 minutes)
4446
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
4547
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
4648
- org -- Alias for defaultOrg

src/commands/config/cmd-config-unset.test.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ describe('socket config unset', async () => {
3535
- apiBaseUrl -- Base URL of the Socket API endpoint
3636
- apiProxy -- A proxy through which to access the Socket API
3737
- apiToken -- The Socket API token required to access most Socket API endpoints
38+
- cacheEnabled -- Enable API response caching (default: false)
39+
- cacheTtl -- Cache TTL in milliseconds (default: 300000 = 5 minutes)
3840
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
3941
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
4042
- org -- Alias for defaultOrg

src/commands/pnpm/cmd-pnpm.test.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ describe('socket pnpm', async () => {
164164

165165
expect(stdout).toMatchInlineSnapshot(`
166166
"Progress: resolved 0, reused 1, downloaded 0, added 0
167+
Progress: resolved 1039, reused 928, downloaded 0, added 0
167168
\\u2009WARN\\u2009 2 deprecated subdependencies found: @sindresorhus/chunkify@2.0.0, boolean@3.2.0
168169
Already up to date
169-
Progress: resolved 1043, reused 932, downloaded 0, added 0, done
170+
Progress: resolved 1045, reused 934, downloaded 0, added 0, done
170171
171172
Done in Xs using pnpm v10.17.0"
172173
`)
@@ -205,7 +206,7 @@ describe('socket pnpm', async () => {
205206
"Progress: resolved 0, reused 1, downloaded 0, added 0
206207
\\u2009WARN\\u2009 2 deprecated subdependencies found: @sindresorhus/chunkify@2.0.0, boolean@3.2.0
207208
Already up to date
208-
Progress: resolved 1043, reused 932, downloaded 0, added 0, done
209+
Progress: resolved 1045, reused 934, downloaded 0, added 0, done
209210
210211
Done in Xs using pnpm v10.17.0"
211212
`)

src/commands/scan/fetch-report-data.test.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ vi.mock('../../constants.mts', () => ({
1717
},
1818
}))
1919

20-
2120
vi.mock('../../utils/errors.mts', () => ({
2221
formatErrorWithDetail: vi.fn(),
2322
}))

0 commit comments

Comments
 (0)