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]: config.ci option #15251

Closed
anthony-hayes opened this issue Aug 9, 2024 · 3 comments
Closed

[Feature]: config.ci option #15251

anthony-hayes opened this issue Aug 9, 2024 · 3 comments

Comments

@anthony-hayes
Copy link

anthony-hayes commented Aug 9, 2024

🚀 Feature Proposal

Have a setting for the --ci flag in jest config files

Motivation

I'd like to use a single test script for both local and ci, and enable jest's --ci mode when CI=true (i.e. I'm running in CI such as GitHub actions)

I'm happy to do this env var check in the jest.config.js, but there's no way to set the ci mode from the config file: https://jestjs.io/docs/configuration

This is important for me when working with a monorepo, to avoid duplicated scripts in many package.json files to allow bulk running of tests with something like turbo run test and to avoid forcing folks to add a test:ci script to every package.json

Example

No response

Pitch

For flexibility, command line options should have a corresponding config file setting

Copy link

github-actions bot commented Sep 8, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 8, 2024
@anthony-hayes
Copy link
Author

Looks like the --ci option isn't needed in new versions of jest, as updating snapshots is opt-in. Closing this

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 Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant