-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Description
Is this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
- path
- parens
- parentheses
- testMatch
Environment
node -v
: v6.10.3npm -v
: v3.10.10yarn --version
(if you use Yarn): N/Anpm ls react-scripts
(if you haven’t ejected): react-scripts@1.0.16
Then, specify:
- Operating system: macOS 10.12.6
- Browser and version (if relevant): N/A
Steps to Reproduce
- Create a directory with parentheses in the name:
mkdir with-\(parens\)
- Navigate to that directory:
cd with-\(parens\)
- Create a new app using create-react-app:
create-react-app parens
- Go into the newly created my-app directory:
cd parens
- Install dependencies:
npm install
- Run tests:
npm test
- You should see a prompt that says "No tests found related to files changed since last commit."
- Press "a" at the prompt to run all the tests.
Expected Behavior
The tests in src/app.test.js
should be run.
Actual Behavior
A message about no tests being found will be shown.
Reproducible Demo
https://github.com/rimunroe/create-react-app-parens-in-test-path
It looks like the parentheses in the path that make up the <rootDir>
later passed to Jest's testMatch
option by create-react-app's config are being interpreted by Jest as grouping characters. I've filed this as an issue with Jest jestjs/jest#4838 as well.