Using node's assert module how can I test the message of an error?
throw new Error('Email is required!');
I'm using assert.throws to check if an error was thrown:
assert.throws(myFunction, Error);
But this does not provide the ability to check the message.