-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 should treat some Emacs buffers as noninteractive #5236
Comments
Would you mind sending a PR to fix this? Thanks! |
I would like to contribute, but to be honest I'm not 100% sure this is possible and I don't know much about the accuracy of Also if it helps, using EDIT: |
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. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
In Emacs, using
shell
,eshell
,shell-command
orcompile
launches a noninteractive buffer that displays the output of the given command. This is a convenient way to run command line tools like Jest in Emacs without having to open a shell. When used with Jest, it incorrectly assumes that the TTY is interactive and prints extra characters that makes the test output long and difficult to read.term
andansi-term
do not have this issue because they are full terminal emulators, but many Emacs users do not use them.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
andyarn test
.M-x shell-command
orM-x compile
with your Jest script (probably justnpm test
or annpx
command). Alternatively to get an interactive shell that is not POSIX compliant and should not be marked as interactive by Jest, useM-x shell
orM-x eshell
.What is the expected behavior?
require('jest-util').isInteractive
should be false in Compilation, Shell Command, Shell, Eshell, and other noninteractive Emacs buffers. Note that Emacs does have other interactive shells. If it's not possible for Jest to determine what kind of Emacs buffer it's running in, Emacs does set some environment variables that tell processes when they are executed in Emacs, and in that case it would be nice to default to disabling interactivity in Emacs.Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
The text was updated successfully, but these errors were encountered: