Skip to content

instanceOf RegExp doesn't work in jest #63

Closed
@georgehb

Description

@georgehb

There is an instanceof RegExp check used in convertRegExpToProxy. This doesn't work in jest which runs each test in a separate execution context.

Changing this check to Object.prototype.toString.call(o) !== "[object RegExp]" should fix the issue.

Metadata

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