You could say:

```js
expect(buffer.read).toThrow({message: "Buffer is empty."});
```

Also, you should be able to use `toThrowError` instead of copying the string. Matching errors on string is not great for maintenance.