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

Make --listTests return a new line separated list when not using --json #4214

Closed
mjesun opened this issue Aug 8, 2017 · 4 comments
Closed
Assignees

Comments

@mjesun
Copy link
Contributor

mjesun commented Aug 8, 2017

Right now, when using the --listTests flag, no matter which other flags you use, the result is reported via console.log using JSON format. This makes difficult to use Jest output with other terminal tools, like grep, awk or for .. in.

I would suggest the following changes:

  • Return a joined \n list when --json is not passed.
  • Use process.stdout.write instead of console.log.
@cpojer
Copy link
Member

cpojer commented Aug 8, 2017

Agreed!

@rogeliog
Copy link
Contributor

rogeliog commented Aug 8, 2017

I can help with this

@mjesun
Copy link
Contributor Author

mjesun commented Aug 8, 2017

That would be great, thanks @rogeliog :)

@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

3 participants