Skip to content

Commit 2e2c5a7

Browse files
jdaltonclaude
andcommitted
test: update test snapshots and expectations for API changes
Update test expectations to match new Ink render behavior and API requirements handling. Fix getRequirementsKey tests to expect SDK method name arrays. Update all snapshots for new API requirements formatting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ffd0bab commit 2e2c5a7

32 files changed

Lines changed: 153 additions & 162 deletions

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,30 @@ describe('socket analytics', async () => {
2020
"Look up analytics data
2121
2222
Usage
23-
$ socket analytics [options] [ "org" | "repo" <reponame>] [TIME]
23+
$ socket analytics [options] [TIME]
24+
$ socket analytics [options] org [TIME]
25+
$ socket analytics [options] repo <org/repo> [TIME]
2426
2527
API Token Requirements
26-
- Quota: 1 unit
28+
- Quota: 10 units
2729
- Permissions: report:write
2830
29-
The scope is either org or repo level, defaults to org.
30-
31-
When scope is repo, a repo slug must be given as well.
31+
Arguments
32+
TIME Number of days: 7, 30, or 90 (default: 30)
33+
<org/repo> Repository slug in org/repo format (e.g., SocketDev/socket-cli)
3234
33-
The TIME argument must be number 7, 30, or 90 and defaults to 30.
35+
The scope is either org or repo level, defaults to org.
3436
3537
Options
3638
--file Path to store result, only valid with --json/--markdown
3739
--json Output as JSON
3840
--markdown Output as Markdown
3941
4042
Examples
43+
$ socket analytics
44+
$ socket analytics 90
4145
$ socket analytics org 7
42-
$ socket analytics repo test-repo 30
43-
$ socket analytics 90"
46+
$ socket analytics repo SocketDev/socket-cli 30"
4447
`)
4548
// Node 24 on Windows currently fails this test with added stderr:
4649
// Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76

src/commands/audit-log/cmd-audit-log.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('socket audit-log', async () => {
2323
$ socket audit-log [options] [FILTER]
2424
2525
API Token Requirements
26-
- Quota: 1 unit
26+
- Quota: 10 units
2727
- Permissions: audit-log:list
2828
2929
This feature requires an Enterprise Plan. To learn more about getting access

src/commands/cli.test.mts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ describe('socket root command', async () => {
8181
\\u203c This causes snapshot failures. Rebuild with: pnpm run pretest:unit
8282
\\u203c Build/test mode mismatch! Built without VITEST=1 but running in test mode.
8383
\\u203c This causes snapshot failures. Rebuild with: pnpm run pretest:unit
84-
\\xd7 Received an unknown command: cargo
85-
\\xd7 Received an unknown command: pnpm
86-
\\xd7 Received an unknown command: uv
87-
\\xd7 Received an unknown command: yarn
8884
_____ _ _ /---------------
8985
| __|___ ___| |_ ___| |_ | CLI: <redacted>
9086
|__ | * | _| '_| -_| _| | token: <redacted>, org: <redacted>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('socket login', async () => {
2222
$ socket login [options]
2323
2424
API Token Requirements
25-
- Quota: 1 unit
25+
(none)
2626
2727
Logs into the Socket API by prompting for an API token
2828

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('socket npm', async () => {
5454
$ socket npm ...
5555
5656
API Token Requirements
57-
- Quota: 100 units
57+
- Quota: 100 units
5858
- Permissions: packages:list
5959
6060
Note: Everything after "npm" is passed to the npm command.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('socket npx', async () => {
5151
$ socket npx ...
5252
5353
API Token Requirements
54-
- Quota: 100 units
54+
- Quota: 100 units
5555
- Permissions: packages:list
5656
5757
Note: Everything after "npx" is passed to the npx command.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('socket optimize', async () => {
120120
$ socket optimize [options] [CWD=.]
121121
122122
API Token Requirements
123-
- Quota: 100 units
123+
- Quota: 100 units
124124
- Permissions: packages:list
125125
126126
Options

src/commands/organization/cmd-organization-dependencies.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('socket organization dependencies', async () => {
2222
socket organization dependencies [options]
2323
2424
API Token Requirements
25-
- Quota: 1 unit
25+
- Quota: 100 units
2626
2727
Options
2828
--json Output as JSON

src/commands/organization/cmd-organization-list.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('socket organization list', async () => {
2424
$ socket organization list [options]
2525
2626
API Token Requirements
27-
- Quota: 1 unit
27+
(none)
2828
2929
Options
3030
--json Output as JSON

src/commands/organization/cmd-organization-policy-license.test.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ describe('socket organization policy license', async () => {
2525
$ socket organization policy license [options]
2626
2727
API Token Requirements
28-
- Quota: 1 unit
29-
- Permissions: license-policy:read
28+
- Permissions: settings:read
3029
3130
Options
3231
--interactive Allow for interactive elements, asking for input. Use --no-interactive to prevent any input questions, defaulting them to cancel/no.

0 commit comments

Comments
 (0)