Skip to content

Jest beforeOnce and afterOnce #4709

@OzairP

Description

@OzairP

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

What is the current behavior?
beforeAll and afterAll run before and after every test suite. Which makes concurrency impossible when your app starts a server.
Multiple test suites will attempt to spawn a server on the same port.

What is the expected behavior?
beforeOnce and afterOnce would run only once before any test suite is run, and after all test suites are done respectively.

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