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.
This commit is contained in:
Stefan Haller 2025-04-30 17:31:10 +02:00
parent 66caa25dcd
commit 7137196788

View file

@ -97,7 +97,7 @@ func TestUserConfigValidate_enums(t *testing.T) {
config.CustomCommands = []CustomCommand{ config.CustomCommands = []CustomCommand{
{ {
Key: "X", Key: "X",
Context: "global", Context: "global", // context is not allowed for submenus
CommandMenu: []CustomCommand{ CommandMenu: []CustomCommand{
{Key: "1", Command: "echo 'hello'", Context: "global"}, {Key: "1", Command: "echo 'hello'", Context: "global"},
}, },
@ -115,7 +115,7 @@ func TestUserConfigValidate_enums(t *testing.T) {
config.CustomCommands = []CustomCommand{ config.CustomCommands = []CustomCommand{
{ {
Key: "X", Key: "X",
Subprocess: &falseVal, Subprocess: &falseVal, // other properties are not allowed for submenus (using subprocess as an example)
CommandMenu: []CustomCommand{ CommandMenu: []CustomCommand{
{Key: "1", Command: "echo 'hello'", Context: "global"}, {Key: "1", Command: "echo 'hello'", Context: "global"},
}, },