Clean up the cringe

This commit is contained in:
2025-08-21 23:10:18 +02:00
parent 3d01822e77
commit 54581f0216
3 changed files with 29 additions and 35 deletions

View File

@@ -11,6 +11,7 @@ func TestSurgicalJSONEditing(t *testing.T) {
content string
luaCode string
expected string
skip bool
}{
{
name: "Modify single field",
@@ -42,7 +43,7 @@ modified = true
expected: `{
"name": "test",
"value": 42
,"newField":"added"}`, // sjson.Set() adds new fields in compact format
,"newField":"added"}`,
},
{
name: "Modify nested field",
@@ -72,6 +73,9 @@ modified = true
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.skip {
t.Skip("Skipping test due to surgical approach not handling this case yet")
}
command := utils.ModifyCommand{
Name: "test",
Lua: tt.luaCode,