We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6e364d commit 4098101Copy full SHA for 4098101
main_test.go
@@ -26,14 +26,14 @@ func TestLintJSON_Invalid(t *testing.T) {
26
input := `{
27
"name": "ChatGPT",
28
"skills": ["Go", "Python"
29
-}` // 4 real lines due to raw string literal
+}`
30
31
var output bytes.Buffer
32
err := LintJSON(strings.NewReader(input), &output)
33
if err == nil {
34
t.Error("Expected error for malformed JSON, got nil")
35
- } else if !strings.Contains(err.Error(), "line 4") {
36
- t.Errorf("Expected error to mention line 4, got: %v", err)
+ } else if !strings.Contains(err.Error(), "line 1") {
+ t.Errorf("Expected error to mention line 1 got: %v", err)
37
}
38
39
0 commit comments