Skip to content

Commit

Permalink
Merge pull request #78 from philippgille/fix-test-panic-on-unexpected…
Browse files Browse the repository at this point in the history
…-pass

Fix test panic on unexpected pass
  • Loading branch information
philippgille authored May 17, 2024
2 parents 6e7a96a + dc34c3c commit 1de154b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ func TestCollection_QueryError(t *testing.T) {
for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
err := tc.query()
if err.Error() != tc.expErr {
if err == nil {
t.Fatal("expected error, got nil")
} else if err.Error() != tc.expErr {
t.Fatal("expected", tc.expErr, "got", err)
}
})
Expand Down

0 comments on commit 1de154b

Please sign in to comment.