Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha 3.0.0-next.68 test --coverage enters watch mode #6836

Closed
jkdowdle opened this issue Apr 17, 2019 · 5 comments
Closed

Alpha 3.0.0-next.68 test --coverage enters watch mode #6836

jkdowdle opened this issue Apr 17, 2019 · 5 comments
Assignees
Projects
Milestone

Comments

@jkdowdle
Copy link

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes.

yarn --version:
1.15.2

Which terms did you search for in User Guide?

alpha test --coverage enters watch mode

Environment

Environment Info:

System:
OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: x64 Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
Binaries:
Node: 10.15.3 - /usr/bin/node
Yarn: 1.15.2 - /usr/bin/yarn
npm: 6.4.1 - /usr/bin/npm
Browsers:
Chrome: 73.0.3683.103
Firefox: 66.0.3
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: 3.0.0-next.68 => 3.0.0-next.68+4b5b76b7
npmGlobalPackages:
create-react-app: 1.5.2

Steps to Reproduce

In terminal

npx create-react-app@next --scripts-version=3.0.0-next.68 app-name 
cd app-name
yarn test --coverage

Check terminal output

Expected Behavior

Run a jest test coverage report.

Actual Behavior

Looks like it is doing a coverage report, but seems to enter jest watch mode.

image

Reproducible Demo

https://github.com/jkdowdle/creact-react-app-3.0.0-next.68-test-coverage-issue

@jkdowdle
Copy link
Author

@iansu iansu added this to To do in v3 via automation Apr 17, 2019
@iansu iansu added this to the 3.0 milestone Apr 17, 2019
@iansu iansu self-assigned this Apr 17, 2019
@iansu
Copy link
Contributor

iansu commented Apr 17, 2019

Likely related to this change: #4176

@bugzpodder
Copy link

bugzpodder commented Apr 17, 2019

Hi @jkdowdle, Thanks for testing the latest alpha.
This is an intentional change. jest did not support watch mode and coverage at the same time last year, so the previous behavior of yarn test --coverage did not run in watch mode.

Now that jest supports --coverage flag in watch mode, the following behaviors are supported by default:
yarn test --coverage which runs jest in watch mode and prints coverage of the touched files
yarn test --coverage --watchAll=false which runs jest in non-watch mode and prints coverage of all files.

@petetnt
Copy link
Contributor

petetnt commented Apr 17, 2019

In addition what @bugzpodder said the watch mode is disabled in CI so it should be a fairly safe change

@jkdowdle
Copy link
Author

@bugzpodder @petetnt

Oh ok I didn't realize that was a feature Jest would introduce. But if this is expected behavior, awesome!

I will close the issue. Appreciate the quick responses on this!

v3 automation moved this from To do to Done Apr 17, 2019
@lock lock bot locked and limited conversation to collaborators Apr 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
v3
  
Done
Development

No branches or pull requests

4 participants