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

[Feature]: outputFile support for listTests option #14943

Closed
manoraj opened this issue Mar 7, 2024 · 3 comments · Fixed by #14980
Closed

[Feature]: outputFile support for listTests option #14943

manoraj opened this issue Mar 7, 2024 · 3 comments · Fixed by #14980

Comments

@manoraj
Copy link
Contributor

manoraj commented Mar 7, 2024

🚀 Feature Proposal

Right now, the --listTests option will just write the list of tests to the console. My proposal is to use the --outputFile option along with the --listTests option to write the output to the file.

Motivation

We wanted to use the list of tests in the custom sequencers. This feature will help to store the list in the file so that the sequencers can access it.

Note that this is just my usecase. There may be different use cases as well.

Example

Pass --outputFile=test-lists.json along with --listTests

yarn test --listTests --json --outputFile=test-lists.json

Pitch

The listTests option is a core feature of Jest and would be great if it support --outputFile as well

@manoraj
Copy link
Contributor Author

manoraj commented Mar 7, 2024

Raised Pull Request here -> #14944

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 Apr 25, 2024
@SimenB
Copy link
Member

SimenB commented May 12, 2024

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants