Skip to content

[Feature] Option to pass --require #2205

Closed
@blakeembrey

Description

@blakeembrey

Do you want to request a feature or report a bug? Feature

What is the current behavior? Does not exist.

What is the expected behavior?

It would be nice to have the possibility to pass through --require or -r, which is available in node.js and mocha. It would just do a direct require() of the content from the current working directory. This flag is regularly used for setup related things, such as -r longjohn -r source-map-support/register, and can also be used for test environment set up.

The only previous mention I've seen of this in jest is #1460, but it didn't touch on the feature itself at all.

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