-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
In Emacs, using shell, eshell, shell-command or compile 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 and ansi-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 and yarn test.
- Launch Emacs.
- Open the directory of any project using Jest.
- Run
M-x shell-commandorM-x compilewith your Jest script (probably justnpm testor annpxcommand). Alternatively to get an interactive shell that is not POSIX compliant and should not be marked as interactive by Jest, useM-x shellorM-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.
- Jest 22.0.4
- Node 9.3.0
- npm 5.6.0
- macOS 10.13.2
- GNU Emacs 25.3 (9.0) [Homebrew Cask]