Skip to content

jsdom environment #67

Open
Open
@joshkel

Description

I'm guessing that this falls under "Unsupported Jest features", but I want to confirm:

Our project contains a mix of front-end (React) and generic (business logic) code, so we let Jest use its default node environment then configure individual test cases to use JSDom via @jest-environment jsdom docblocks. This is faster than initializing JSDom everywhere.

In a brief experiment with jest-light-runner, I saw that these tests are failing. I assume that, because jest-light-runner doesn't use vm to isolate tests, it doesn't support @jest-environment docblocks and must run every test in the same environment?

Thank you.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions