Const
Assertion for testing if an Error has a specific message.
expect(new Error('oops'), 'to have message', 'oops'); // passesexpect(new Error('oops'), 'to have message', 'wrong'); // fails Copy
expect(new Error('oops'), 'to have message', 'oops'); // passesexpect(new Error('oops'), 'to have message', 'wrong'); // fails
Assertion for testing if an Error has a specific message.