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

Support outputFile option for listTests option #14944

Conversation

manoraj
Copy link
Contributor

@manoraj manoraj commented Mar 7, 2024

Summary

Added to Feature Proposal as well -> #14943

🚀 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

Copy link

linux-foundation-easycla bot commented Mar 7, 2024

CLA Not Signed

Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for jestjs ready!

Name Link
🔨 Latest commit 74ad243
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/65f556ba501c7700086b8d91
😎 Deploy Preview https://deploy-preview-14944--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me, thanks!

Could you add a changelog entry and an integration test?

packages/jest-core/src/runJest.ts Outdated Show resolved Hide resolved
manoraj and others added 4 commits March 9, 2024 16:23
@manoraj manoraj requested a review from SimenB March 9, 2024 11:41
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! All that's missing is @mkenchugonde signing the CLA 🙂

@SimenB SimenB linked an issue Mar 11, 2024 that may be closed by this pull request
@SimenB
Copy link
Member

SimenB commented Mar 16, 2024

@mkenchugonde hello! 👋 could you sign the CLA? 🙂

@manoraj
Copy link
Contributor Author

manoraj commented Mar 16, 2024

@mkenchugonde hello! 👋 could you sign the CLA? 🙂

I am not sure how I ended up pushing commits from @mkenchugonde ( I intend to use my personal account @manoraj ). I have signed the CLA from @mkenchugonde, but it needs approval from the organization I guess. I will wait for one or two days before seeking help for next steps.

@SimenB
Copy link
Member

SimenB commented Mar 20, 2024

If it's all you, you should be able to just rebase and change author or squash the commits

@manoraj
Copy link
Contributor Author

manoraj commented Mar 21, 2024

If it's all you, you should be able to just rebase and change author or squash the commits

@SimenB Have created new PR -> #14980. Will close this PR once you acknowledge.

@manoraj manoraj closed this Mar 25, 2024
@manoraj manoraj deleted the mk/Feature-14943-Support-outputFile-option-for-listTests branch March 25, 2024 03:12
Copy link

This pull request 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: outputFile support for listTests option
3 participants