Skip to content

Commit ea53765

Browse files
author
Zhou Hao
authored
Merge pull request #475 from wking/json-schema-better-unexpected-error-messages
validate/validate_test: Better error messages for unexpected JSON Schema errors
2 parents fd40b10 + 6e7da81 commit ea53765

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

validate/validate_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ func TestJSONSchema(t *testing.T) {
7272
v := &Validator{spec: tt.config}
7373
errs := v.CheckJSONSchema()
7474
if tt.error == "" {
75-
assert.Equal(t, nil, errs)
76-
return
75+
if errs == nil {
76+
return
77+
}
78+
t.Fatalf("expected no error, but got: %s", errs.Error())
7779
}
7880
if errs == nil {
7981
t.Fatal("failed to raise the expected error")

0 commit comments

Comments
 (0)