Skip to content

Commit 1461c42

Browse files
committed
fix
1 parent 5c26cde commit 1461c42

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkg/jsonutils/jsonutils_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
// TestWrapText tests the text wrapping functionality.
1010
func TestWrapText(t *testing.T) {
1111
testCases := []struct {
12-
name string
13-
width int
14-
text string
15-
expected []string
12+
expected []string // Slice pointer (largest)
13+
name string // String
14+
text string // String
15+
width int // Integer (smallest)
1616
}{
1717
{
1818
name: "empty text",
@@ -204,26 +204,26 @@ func TestToolsListFormatting(t *testing.T) {
204204
"description": "This is a longer description that should wrap across multiple lines in the table output when displayed to the user",
205205
},
206206
}
207-
207+
208208
// Convert to expected structure
209209
toolsData := map[string]any{
210210
"tools": tools,
211211
}
212-
212+
213213
output, err := formatTable(toolsData)
214214
if err != nil {
215215
t.Fatalf("Error formatting tools list: %v", err)
216216
}
217-
217+
218218
// Basic verification
219219
if !strings.Contains(output, "NAME") || !strings.Contains(output, "DESCRIPTION") {
220220
t.Errorf("Missing table headers in output: %s", output)
221221
}
222-
222+
223223
if !strings.Contains(output, "tool1") || !strings.Contains(output, "tool2") {
224224
t.Errorf("Missing tool names in output: %s", output)
225225
}
226-
226+
227227
if !strings.Contains(output, "This is a short description") {
228228
t.Errorf("Missing tool description in output: %s", output)
229229
}

0 commit comments

Comments
 (0)