Tests, error type and regexp

Tests have been added for the whole library, covering the whole usage.

`expect()` now has to be supplied with a required first parameter,
defining the error type it expectes. Multiple error types can be supplied
in an error.

The first parameter can optionally be an RegExp instead, testing the
regexp on the error message.