Skip to content

rejectedWith not checking the error message #272

Open
@mani-vandrangi

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions