Skip to content

Commit 7137196

Browse files
committed
Add comments in tests to explain what they test
Looking at these again, I needed a moment to remember what they do, so make this more obvious to help future readers.
1 parent 66caa25 commit 7137196

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/config/user_config_validation_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func TestUserConfigValidate_enums(t *testing.T) {
9797
config.CustomCommands = []CustomCommand{
9898
{
9999
Key: "X",
100-
Context: "global",
100+
Context: "global", // context is not allowed for submenus
101101
CommandMenu: []CustomCommand{
102102
{Key: "1", Command: "echo 'hello'", Context: "global"},
103103
},
@@ -115,7 +115,7 @@ func TestUserConfigValidate_enums(t *testing.T) {
115115
config.CustomCommands = []CustomCommand{
116116
{
117117
Key: "X",
118-
Subprocess: &falseVal,
118+
Subprocess: &falseVal, // other properties are not allowed for submenus (using subprocess as an example)
119119
CommandMenu: []CustomCommand{
120120
{Key: "1", Command: "echo 'hello'", Context: "global"},
121121
},

0 commit comments

Comments
 (0)