Skip to content

Commit 9bd0b67

Browse files
committed
graphql_test: leverages errors.Is method
1 parent f4427f6 commit 9bd0b67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func TestResultErrorsJoinedSuccess(t *testing.T) {
290290
expected := errors.New("second error: first error")
291291

292292
if err := r.ErrorsJoined(); err != nil {
293-
if !reflect.DeepEqual(err.Error(), expected.Error()) {
293+
if errors.Is(err, expected) {
294294
t.Fatalf("wrong result, want: %v, got: %v", expected, err)
295295
}
296296

0 commit comments

Comments
 (0)