Skip to content

[Feature]: Support VError's cause() method #15624

@jannikschaper

Description

@jannikschaper

🚀 Feature Proposal

Jest has support for printing the cause chain in a backtrace, via Node's Error API where an error can have a cause attribute.

Jest should also be able to do that when cause() is a method instead of an attribute

Motivation

The hugely popular verror package uses a cause() method instead of a cause attribute. Tweaking Jest to support both styles would make it compatible with projects using verror

Example

No response

Pitch

It belongs in this repo because the code that needs to be modified also lives here: #11935

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions