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

cli argument to prevent snapshot recording during CI #3206

Closed
quentin- opened this issue Mar 25, 2017 · 5 comments
Closed

cli argument to prevent snapshot recording during CI #3206

quentin- opened this issue Mar 25, 2017 · 5 comments

Comments

@quentin-
Copy link

quentin- commented Mar 25, 2017

Do you want to request a feature or report a bug?

feature

What is the current behavior?

I can't ensure that all snapshots were recorded before running test in CI.
Unrecorded snapshots will be written on the CI server fs and the test suite will pass.

What is the expected behavior?

I can ensure that the test will fail if it tries to create a new snapshot.

--recordSnapshot    Records snapshots.
                    Useful to disable when you want
                    to make sure all snapshot are already recoded (e.g: on CI)
                    Disable using --no-recordSnapshot.
                    [boolean] [default: true]
@rogeliog
Copy link
Contributor

This is quite interesting

@cpojer
Copy link
Member

cpojer commented Mar 26, 2017

We should simply detect if "CI" is present. If it is, don't offer to write snapshots initially unless -u is specified. This should be the default. Happy to receive PRs for this :)

@aaronabramov
Copy link
Contributor

there's a other things that are different on CI,
we should just have --ci flag that adds these defaults

@cpojer cpojer added this to the Jest 20 milestone Apr 28, 2017
@cpojer
Copy link
Member

cpojer commented May 3, 2017

This'll be in Jest 20. See #3456.

@cpojer cpojer closed this as completed May 3, 2017
@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.
Projects
None yet
Development

No branches or pull requests

5 participants