Skip to content

TypeError: TestEnvironment is not a constructor in combination with Enzyme #546

Closed
jestjs/jest
#1580
@ehtb

Description

@ehtb

With Enzyme installed, running tests:

"test": "react-scripts test --env=jsdom"

Throws the error:

TypeError: TestEnvironment is not a constructor
at runTest (node_modules/react-scripts/node_modules/jest/node_modules/jest-cli/build/runTest.js:30:15)

The tests run correctly when removing --env=jsdom.

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