I am using this chunk of code:
assert.throws(async () => {
patientSubscriber = await PatientSubscriber.create({
isSubscribed: true,
patient: patient._id,
subscriber: user._id
});
},{
message: /foo/
});
when I run it I get this:
AssertionError [ERR_ASSERTION]: Missing expected exception.
The assert API is: https://nodejs.org/api/assert.html#assert_assert_throws_fn_error_message
Maybe I am hitting this issue? https://github.com/nodejs/node-v0.x-archive/issues/8368
Anyone know what that error is about?