Skip to content

Support jest globalSetup #4393

Closed
Closed
@DuskLoop

Description

@DuskLoop

Is this a bug report?

No

Problem

I have some setup code that I want to run once before all tests. If I run the code in setupTests.js it will run before every test which slows down the total test time alot.

Jest seems to have an option for this: https://facebook.github.io/jest/docs/en/configuration.html#globalsetup-string
But when I add this option in my package.json jest config section I get message:
These options in your package.json Jest configuration are not currently supported by Create React App:

• globalSetup

Would be nice to see this option supported by Create React App or if someone could provide a workaround for this issue.

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