-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
🚀 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