Skip to content

Commit 77533a4

Browse files
committed
Format and refine Claude Code settings tests
1 parent 8e28509 commit 77533a4

5 files changed

Lines changed: 28 additions & 29 deletions

File tree

src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
"extraKnownMarketplaces": {
33
"internal-git": {
44
"source": {
5-
"source": "hostPattern",
6-
"repo": "acme/internal-tools"
5+
"source": "hostPattern"
76
}
87
}
98
},
109
"strictKnownMarketplaces": [
1110
{
12-
"source": "hostPattern",
13-
"hostPattern": 123
11+
"hostPattern": 123,
12+
"source": "hostPattern"
1413
}
1514
]
1615
}
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
{
22
"cleanupPeriodDays": "thirty",
33
"enableAllProjectMcpServers": 1,
4-
"includeCoAuthoredBy": "yes",
5-
"permissions": {
6-
"additionalDirectories": "should be array",
7-
"allow": "should be array",
8-
"ask": "should be array"
9-
},
10-
"sandbox": {
11-
"network": {
12-
"allowAllUnixSockets": "yes",
13-
"allowedDomains": "api.anthropic.com"
14-
}
15-
},
164
"hooks": {
175
"PreToolUse": [
186
{
@@ -25,5 +13,17 @@
2513
]
2614
}
2715
]
16+
},
17+
"includeCoAuthoredBy": "yes",
18+
"permissions": {
19+
"additionalDirectories": "should be array",
20+
"allow": "should be array",
21+
"ask": "should be array"
22+
},
23+
"sandbox": {
24+
"network": {
25+
"allowAllUnixSockets": "yes",
26+
"allowedDomains": "api.anthropic.com"
27+
}
2828
}
2929
}

src/test/claude-code-settings/hooks-complete.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
{
4545
"hooks": [
4646
{
47-
"command": "echo 'Running bash command' >> /tmp/claude-log.txt",
4847
"async": true,
48+
"command": "echo 'Running bash command' >> /tmp/claude-log.txt",
4949
"timeout": 5,
5050
"type": "command"
5151
}

src/test/claude-code-settings/marketplace-host-pattern.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"extraKnownMarketplaces": {
33
"internal-git": {
44
"source": {
5-
"source": "hostPattern",
6-
"hostPattern": "git.internal.example.com"
5+
"hostPattern": "git.internal.example.com",
6+
"source": "hostPattern"
77
}
88
}
99
},
1010
"strictKnownMarketplaces": [
1111
{
12-
"source": "hostPattern",
13-
"hostPattern": "*.corp.example"
12+
"hostPattern": "*.corp.example",
13+
"source": "hostPattern"
1414
}
1515
]
1616
}

src/test/claude-code-settings/modern-complete-config.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
"CLAUDE_LOG_LEVEL": "debug",
1616
"PROJECT_ROOT": "/home/user/projects"
1717
},
18+
"extraKnownMarketplaces": {
19+
"corp-git-host": {
20+
"source": {
21+
"hostPattern": "git.corp.example",
22+
"source": "hostPattern"
23+
}
24+
}
25+
},
1826
"fileSuggestion": {
1927
"command": "~/.claude/file-suggestion.sh",
2028
"type": "command"
@@ -44,14 +52,6 @@
4452
}
4553
]
4654
},
47-
"extraKnownMarketplaces": {
48-
"corp-git-host": {
49-
"source": {
50-
"hostPattern": "git.corp.example",
51-
"source": "hostPattern"
52-
}
53-
}
54-
},
5555
"includeCoAuthoredBy": true,
5656
"language": "english",
5757
"outputStyle": "Explanatory",

0 commit comments

Comments
 (0)