Skip to content

Jest 23 --config breaks create-react-app on Windows #6385

@bugzpodder

Description

@bugzpodder

I am trying to use Jest 23 in create-react-app@next facebook/create-react-app#4555
In particular I've found windows config to break after the upgrade.
The specific part of config being generated is https://github.com/facebook/create-react-app/blob/next/packages/react-scripts/scripts/utils/createJestConfig.js#L47
In Jest 22.4.3 the regex is [\\\\\\\\\\\\]node_modules[\\\\\\\\\\\\].+\.(js|jsx|mjs)$|^.+\.module\.(css|sass|scss)$/ (12 slashes) in jest-runtime
In Jest 23 the error is Invalid regular expression: /[\\\\\]node_modules[\\\\\].+\.(js|jsx|mjs)$|^.+\.module\.(css|sass|scss)$/

Does not repo on other platforms.

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