rejectedWith is not returning error when if error message is different from actual value.
Node version: 10.16.3
chai-as-promised version: 7.1.1
chai version: 4.2.0
E.g.: expect(fn()).to.be.rejectedWith(CustomError, error message) is returning always true as long as fn is just throwing custom Error with an error message whose prefix is same as error message.
rejectedWith is not returning error when if error message is different from actual value.
Node version: 10.16.3
chai-as-promised version: 7.1.1
chai version: 4.2.0
E.g.: expect(fn()).to.be.rejectedWith(CustomError, error message) is returning always true as long as fn is just throwing custom Error with an error message whose prefix is same as error message.