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

Jest hangs when quitting watch mode if dev tools are still attached #5028

Closed
andyearnshaw opened this issue Dec 6, 2017 · 1 comment
Closed

Comments

@andyearnshaw
Copy link
Contributor

andyearnshaw commented Dec 6, 2017

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Jest won't close until the dev tools are closed when run with the --watch parameter, Ctrl-C and Ctrl-\ are ignored.

If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install and yarn test.

  1. Fire up jest in any repo with npx -n --inspect jest --watch.
  2. Open the node inspector and make sure the console output says "Debugger attached".
  3. Press q or Ctrl-C to quit jest.
  4. Press Ctrl-C and observe that nothing happens.
  5. Press Ctrl-\ and observe that nothing happens.

What is the expected behavior?
Ctrl-C or Ctrl-\ should quit the process, allowing the dev tools to remain open to connect to the next available node process. When the --watch parameter is not provided, jest works as expected.

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

Jest: v21.2.1
Node: v8.9.2
NPM: 5.5.1
OS: macOS High Sierra

andyearnshaw added a commit to andyearnshaw/jest that referenced this issue Dec 6, 2017
andyearnshaw added a commit to andyearnshaw/jest that referenced this issue Feb 13, 2018
andyearnshaw pushed a commit to andyearnshaw/jest that referenced this issue Feb 13, 2018
@cpojer cpojer closed this as completed in 4ca959b Feb 14, 2018
jessecarfb pushed a commit to jessecarfb/jest that referenced this issue Feb 14, 2018
* Revert setRawMode on --watch ctrl-c (jestjs#5028)

* Disable stdin raw mode in watch quit plugin (jestjs#5028)

* Update changelog
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant