Ensures we check the hook results in unit tests after an expected error occurs, as well as when no error occurs. We were missing some test coverage.
Fixes a bug the freshened tests reveal: that sometimes hooks are not called (which is also the subject of #161, which this PR resolves). Thanks to @abakhirkin for the fix.
This PR does two main things: