Skip to content

Commit c6e364d

Browse files
committed
fix unit test
1 parent 31595a9 commit c6e364d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ func TestLintJSON_Valid(t *testing.T) {
2424

2525
func TestLintJSON_Invalid(t *testing.T) {
2626
input := `{
27-
"name": "ChatGPT",
28-
"skills": ["Go", "Python"
29-
}` // Missing closing bracket
27+
"name": "ChatGPT",
28+
"skills": ["Go", "Python"
29+
}` // 4 real lines due to raw string literal
3030

3131
var output bytes.Buffer
3232
err := LintJSON(strings.NewReader(input), &output)
3333
if err == nil {
3434
t.Error("Expected error for malformed JSON, got nil")
3535
} else if !strings.Contains(err.Error(), "line 4") {
36-
t.Errorf("Expected error to mention line number, got: %v", err)
36+
t.Errorf("Expected error to mention line 4, got: %v", err)
3737
}
3838
}
3939

0 commit comments

Comments
 (0)