* tests: fix error verification
So far the error message was not tested at all. This change makes
sure the error will actually be tested for.
* tests: remove unnecessary api calls
`assert.doesNotThrow` does not provide any benefit since it will
only catch errors and then rethrow in case of an error.