Skip to content

Commit

Permalink
make func TestSearch.unknown_word check for nil (#617)
Browse files Browse the repository at this point in the history
Otherwise, there is a regression during refactoring.
  • Loading branch information
1Mark authored Jun 21, 2024
1 parent 42acf1c commit a61ff58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ We can get rid of the magic error in our `Search` function by extracting it into
```go
t.Run("unknown word", func(t *testing.T) {
_, got := dictionary.Search("unknown")

if got == nil {
t.Fatal("expected to get an error.")
}
assertError(t, got, ErrNotFound)
})
```
Expand Down

0 comments on commit a61ff58

Please sign in to comment.